comparison src/video/quartz/SDL_QuartzVideo.m @ 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 976bc19f8f6b
children c7b1d5eaa77d
comparison
equal deleted inserted replaced
4235:88aa213ffc7b 4236:1fc8c8a5ff00
865 case 24: 865 case 24:
866 SDL_SetError ("24bpp is not available"); 866 SDL_SetError ("24bpp is not available");
867 return NULL; 867 return NULL;
868 case 32: /* (8)-8-8-8 ARGB */ 868 case 32: /* (8)-8-8-8 ARGB */
869 amask = 0x00000000; 869 amask = 0x00000000;
870 if ( flags & SDL_FULLSCREEN )
871 {
872 rmask = 0x00FF0000;
873 gmask = 0x0000FF00;
874 bmask = 0x000000FF;
875 }
876 else
877 {
870 #ifdef __LITTLE_ENDIAN__ 878 #ifdef __LITTLE_ENDIAN__
871 rmask = 0x0000FF00; 879 rmask = 0x0000FF00;
872 gmask = 0x00FF0000; 880 gmask = 0x00FF0000;
873 bmask = 0xFF000000; 881 bmask = 0xFF000000;
874 #else 882 #else
875 rmask = 0x00FF0000; 883 rmask = 0x00FF0000;
876 gmask = 0x0000FF00; 884 gmask = 0x0000FF00;
877 bmask = 0x000000FF; 885 bmask = 0x000000FF;
878 #endif 886 #endif
887 }
879 break; 888 break;
880 } 889 }
881 890
882 if ( ! SDL_ReallocFormat (current, bpp, 891 if ( ! SDL_ReallocFormat (current, bpp,
883 rmask, gmask, bmask, amask ) ) { 892 rmask, gmask, bmask, amask ) ) {
884 SDL_SetError ("Couldn't reallocate pixel format"); 893 SDL_SetError ("Couldn't reallocate pixel format");
885 return NULL; 894 return NULL;
886 } 895 }
887 } 896 }
888 897
889 /* Signal successful completion (used internally) */ 898 /* Signal successful completion (used internally) */
890 video_set = SDL_TRUE; 899 video_set = SDL_TRUE;
891 900