Finally bugfixed: the simpler the better
authorPatrice Mandin <patmandin@gmail.com>
Wed, 03 Sep 2003 20:07:16 +0000
changeset 712 8be92df64b22
parent 711 8db4098e944b
child 713 7c8deec1659c
Finally bugfixed: the simpler the better
src/video/xbios/SDL_xbios.c
--- a/src/video/xbios/SDL_xbios.c	Tue Sep 02 19:49:50 2003 +0000
+++ b/src/video/xbios/SDL_xbios.c	Wed Sep 03 20:07:16 2003 +0000
@@ -400,19 +400,13 @@
 
 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)