From b0c831ddc04fbe9cfc6aab4b92e032a4f8dc6f90 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 --HG-- branch : SDL-1.2 extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%403885 --- 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 @@ static SDL_Surface* QZ_SetVideoMode (_THIS, SDL_Surface *current, int width, 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 @@ static SDL_Surface* QZ_SetVideoMode (_THIS, SDL_Surface *current, int width, rmask, gmask, bmask, amask ) ) { SDL_SetError ("Couldn't reallocate pixel format"); return NULL; - } + } } /* Signal successful completion (used internally) */