diff --git a/sdl.c b/sdl.c index bac60ea4654b9d6a6d712a5847806786251a7d6c..719e2bd5a6a3d3984aa5e4cff43a00349386608c 100644 --- a/sdl.c +++ b/sdl.c @@ -89,7 +89,7 @@ static void sdl_resize(DisplayState *ds, int w, int h) ds->data = screen->pixels; ds->linesize = screen->pitch; ds->depth = screen->format->BitsPerPixel; - if (screen->format->Bshift > screen->format->Rshift) { + if (ds->depth == 32 && screen->format->Rshift == 0) { ds->bgr = 1; } else { ds->bgr = 0;