Skip to content

Commit

Permalink
Fixed endianness issues with fullscreen mode
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Sep 23, 2009
1 parent 016bed2 commit 88a822f
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions src/video/quartz/SDL_QuartzVideo.m
Expand Up @@ -867,23 +867,32 @@ 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;
}

if ( ! SDL_ReallocFormat (current, bpp,
rmask, gmask, bmask, amask ) ) {
SDL_SetError ("Couldn't reallocate pixel format");
return NULL;
}
}
}

/* Signal successful completion (used internally) */
Expand Down

0 comments on commit 88a822f

Please sign in to comment.