changeset 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 31835fd24b2b
children 4932f192c565
files src/SDL_compat.c
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
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;