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
This commit is contained in:
parent
a0d5e9ed41
commit
b0c831ddc0
1 changed files with 16 additions and 7 deletions
|
@ -867,15 +867,24 @@ static SDL_Surface* QZ_SetVideoMode (_THIS, SDL_Surface *current, int width,
|
||||||
return NULL;
|
return NULL;
|
||||||
case 32: /* (8)-8-8-8 ARGB */
|
case 32: /* (8)-8-8-8 ARGB */
|
||||||
amask = 0x00000000;
|
amask = 0x00000000;
|
||||||
|
if ( flags & SDL_FULLSCREEN )
|
||||||
|
{
|
||||||
|
rmask = 0x00FF0000;
|
||||||
|
gmask = 0x0000FF00;
|
||||||
|
bmask = 0x000000FF;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
#ifdef __LITTLE_ENDIAN__
|
#ifdef __LITTLE_ENDIAN__
|
||||||
rmask = 0x0000FF00;
|
rmask = 0x0000FF00;
|
||||||
gmask = 0x00FF0000;
|
gmask = 0x00FF0000;
|
||||||
bmask = 0xFF000000;
|
bmask = 0xFF000000;
|
||||||
#else
|
#else
|
||||||
rmask = 0x00FF0000;
|
rmask = 0x00FF0000;
|
||||||
gmask = 0x0000FF00;
|
gmask = 0x0000FF00;
|
||||||
bmask = 0x000000FF;
|
bmask = 0x000000FF;
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -883,7 +892,7 @@ static SDL_Surface* QZ_SetVideoMode (_THIS, SDL_Surface *current, int width,
|
||||||
rmask, gmask, bmask, amask ) ) {
|
rmask, gmask, bmask, amask ) ) {
|
||||||
SDL_SetError ("Couldn't reallocate pixel format");
|
SDL_SetError ("Couldn't reallocate pixel format");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Signal successful completion (used internally) */
|
/* Signal successful completion (used internally) */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue