comparison include/SDL_surface.h @ 5246:189b1bdb7baf

Surfaces aren't in hardware memory anymore!
author Sam Lantinga <slouken@libsdl.org>
date Thu, 10 Feb 2011 05:10:05 -0800
parents d72793305335
children b530ef003506
comparison
equal deleted inserted replaced
5245:a9eb73f21e3a 5246:189b1bdb7baf
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