From 88a822ff60d8fcea30b51b701b31c5f7e676e997 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Wed, 23 Sep 2009 06:56:28 +0000 Subject: [PATCH] Fixed endianness issues with fullscreen mode --- src/video/quartz/SDL_QuartzVideo.m | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/src/video/quartz/SDL_QuartzVideo.m b/src/video/quartz/SDL_QuartzVideo.m index d2701253f..f34957156 100644 --- a/src/video/quartz/SDL_QuartzVideo.m +++ b/src/video/quartz/SDL_QuartzVideo.m @@ -867,15 +867,24 @@ other blitting while waiting on the VBL (and hence results in higher framerates) 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 @@ other blitting while waiting on the VBL (and hence results in higher framerates) rmask, gmask, bmask, amask ) ) { SDL_SetError ("Couldn't reallocate pixel format"); return NULL; - } + } } /* Signal successful completion (used internally) */