From 238f53877d51431bd23b9f3fa5356dcd6b459c4e Mon Sep 17 00:00:00 2001 From: Patrice Mandin Date: Wed, 3 Sep 2003 20:07:16 +0000 Subject: [PATCH] Finally bugfixed: the simpler the better --HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40713 --- src/video/xbios/SDL_xbios.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/video/xbios/SDL_xbios.c b/src/video/xbios/SDL_xbios.c index 8ed095ec8..553a92c6c 100644 --- a/src/video/xbios/SDL_xbios.c +++ b/src/video/xbios/SDL_xbios.c @@ -400,19 +400,13 @@ 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 */ - if (format->BitsPerPixel == 15) { + if ((format->BitsPerPixel != 8) && (format->BitsPerPixel !=16)) { return NULL; } - numlist = (format->BitsPerPixel)>>4; - if (numlist>1) - return NULL; - - return(SDL_modelist[numlist]); + return(SDL_modelist[(format->BitsPerPixel)>>4]); } static void XBIOS_FreeBuffers(_THIS)