mirror of
https://github.com/yawut/SDL.git
synced 2026-09-30 12:16:43 -05:00
Severe bugfix: format->BitsPerPixel not checked in ListModes function
This commit is contained in:
@@ -400,9 +400,19 @@ static int XBIOS_VideoInit(_THIS, SDL_PixelFormat *vformat)
|
||||
|
||||
static SDL_Rect **XBIOS_ListModes(_THIS, SDL_PixelFormat *format, Uint32 flags)
|
||||
{
|
||||
unsigned int numlist;
|
||||
|
||||
/* 8 bits -> list 0 */
|
||||
/* 16 bits -> list 1 */
|
||||
return(SDL_modelist[(format->BitsPerPixel)>>4]);
|
||||
if (format->BitsPerPixel == 15) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
numlist = (format->BitsPerPixel)>>4;
|
||||
if (numlist>1)
|
||||
return NULL;
|
||||
|
||||
return(SDL_modelist[numlist]);
|
||||
}
|
||||
|
||||
static void XBIOS_FreeBuffers(_THIS)
|
||||
|
||||
Reference in New Issue
Block a user