From c7bd7bec8cc34489be3048afccaeea91169ac15f Mon Sep 17 00:00:00 2001 From: aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162> Date: Wed, 23 Jul 2008 13:24:33 +0000 Subject: [PATCH] Fix SDL problems with BGR displays (Avi Kivity) --- sdl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdl.c b/sdl.c index bac60ea..719e2bd 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; -- libgit2 0.23.3