diff src/SDL_compat.c @ 2240:eebaa05f8bd9

Fixed crash setting 0 bpp video mode.
author Sam Lantinga <slouken@libsdl.org>
date Wed, 15 Aug 2007 03:18:24 +0000
parents bb67fd5ccfdb
children e61ad15a205f
line wrap: on
line diff
--- a/src/SDL_compat.c	Mon Aug 13 06:24:56 2007 +0000
+++ b/src/SDL_compat.c	Wed Aug 15 03:18:24 2007 +0000
@@ -457,6 +457,7 @@
             } else {
                 desired_format = SDL_PIXELFORMAT_RGB888;
             }
+            bpp = SDL_BITSPERPIXEL(desired_format);
             break;
         case 8:
             desired_format = SDL_PIXELFORMAT_INDEX8;