Mercurial > sdl-ios-xcode
comparison include/SDL_surface.h @ 5281:15a71bec4a55
merged
author | Eric Wing <ewing . public |-at-| gmail . com> |
---|---|
date | Sat, 12 Feb 2011 19:16:09 -0800 |
parents | b530ef003506 |
children |
comparison
equal
deleted
inserted
replaced
5219:adfcdd311ae0 | 5281:15a71bec4a55 |
---|---|
1 /* | 1 /* |
2 SDL - Simple DirectMedia Layer | 2 SDL - Simple DirectMedia Layer |
3 Copyright (C) 1997-2010 Sam Lantinga | 3 Copyright (C) 1997-2011 Sam Lantinga |
4 | 4 |
5 This library is free software; you can redistribute it and/or | 5 This library is free software; you can redistribute it and/or |
6 modify it under the terms of the GNU Lesser General Public | 6 modify it under the terms of the GNU Lesser General Public |
7 License as published by the Free Software Foundation; either | 7 License as published by the Free Software Foundation; either |
8 version 2.1 of the License, or (at your option) any later version. | 8 version 2.1 of the License, or (at your option) any later version. |
432 both: | 432 both: |
433 if SDL_SRCCOLORKEY set, only copy the pixels matching the | 433 if SDL_SRCCOLORKEY set, only copy the pixels matching the |
434 source colour key. | 434 source colour key. |
435 \endverbatim | 435 \endverbatim |
436 * | 436 * |
437 * If either of the surfaces were in video memory, and the blit returns -2, | |
438 * the video memory was lost, so it should be reloaded with artwork and | |
439 * re-blitted: | |
440 * @code | |
441 * while ( SDL_BlitSurface(image, imgrect, screen, dstrect) == -2 ) { | |
442 * while ( SDL_LockSurface(image) < 0 ) | |
443 * Sleep(10); | |
444 * -- Write image pixels to image->pixels -- | |
445 * SDL_UnlockSurface(image); | |
446 * } | |
447 * @endcode | |
448 * | |
449 * This happens under DirectX 5.0 when the system switches away from your | |
450 * fullscreen application. The lock will also fail until you have access | |
451 * to the video memory again. | |
452 * | |
453 * You should call SDL_BlitSurface() unless you know exactly how SDL | 437 * You should call SDL_BlitSurface() unless you know exactly how SDL |
454 * blitting works internally and how to use the other blit functions. | 438 * blitting works internally and how to use the other blit functions. |
455 */ | 439 */ |
456 #define SDL_BlitSurface SDL_UpperBlit | 440 #define SDL_BlitSurface SDL_UpperBlit |
457 | 441 |