Mercurial > sdl-ios-xcode
changeset 4236:1fc8c8a5ff00 SDL-1.2
Fixed endianness issues with fullscreen mode
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Wed, 23 Sep 2009 06:56:28 +0000 |
parents | 88aa213ffc7b |
children | 0adda8ff43ef |
files | src/video/quartz/SDL_QuartzVideo.m |
diffstat | 1 files changed, 16 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/src/video/quartz/SDL_QuartzVideo.m Wed Sep 23 06:35:28 2009 +0000 +++ b/src/video/quartz/SDL_QuartzVideo.m Wed Sep 23 06:56:28 2009 +0000 @@ -867,15 +867,24 @@ return NULL; case 32: /* (8)-8-8-8 ARGB */ amask = 0x00000000; + if ( flags & SDL_FULLSCREEN ) + { + rmask = 0x00FF0000; + gmask = 0x0000FF00; + bmask = 0x000000FF; + } + else + { #ifdef __LITTLE_ENDIAN__ - rmask = 0x0000FF00; - gmask = 0x00FF0000; - bmask = 0xFF000000; + rmask = 0x0000FF00; + gmask = 0x00FF0000; + bmask = 0xFF000000; #else - rmask = 0x00FF0000; - gmask = 0x0000FF00; - bmask = 0x000000FF; + rmask = 0x00FF0000; + gmask = 0x0000FF00; + bmask = 0x000000FF; #endif + } break; } @@ -883,7 +892,7 @@ rmask, gmask, bmask, amask ) ) { SDL_SetError ("Couldn't reallocate pixel format"); return NULL; - } + } } /* Signal successful completion (used internally) */