Mercurial > sdl-ios-xcode
comparison src/video/xbios/SDL_xbios.c @ 712:8be92df64b22
Finally bugfixed: the simpler the better
author | Patrice Mandin <patmandin@gmail.com> |
---|---|
date | Wed, 03 Sep 2003 20:07:16 +0000 |
parents | 8db4098e944b |
children | abec2a842d11 |
comparison
equal
deleted
inserted
replaced
711:8db4098e944b | 712:8be92df64b22 |
---|---|
398 return(0); | 398 return(0); |
399 } | 399 } |
400 | 400 |
401 static SDL_Rect **XBIOS_ListModes(_THIS, SDL_PixelFormat *format, Uint32 flags) | 401 static SDL_Rect **XBIOS_ListModes(_THIS, SDL_PixelFormat *format, Uint32 flags) |
402 { | 402 { |
403 unsigned int numlist; | |
404 | |
405 /* 8 bits -> list 0 */ | 403 /* 8 bits -> list 0 */ |
406 /* 16 bits -> list 1 */ | 404 /* 16 bits -> list 1 */ |
407 if (format->BitsPerPixel == 15) { | 405 if ((format->BitsPerPixel != 8) && (format->BitsPerPixel !=16)) { |
408 return NULL; | 406 return NULL; |
409 } | 407 } |
410 | 408 |
411 numlist = (format->BitsPerPixel)>>4; | 409 return(SDL_modelist[(format->BitsPerPixel)>>4]); |
412 if (numlist>1) | |
413 return NULL; | |
414 | |
415 return(SDL_modelist[numlist]); | |
416 } | 410 } |
417 | 411 |
418 static void XBIOS_FreeBuffers(_THIS) | 412 static void XBIOS_FreeBuffers(_THIS) |
419 { | 413 { |
420 int i; | 414 int i; |