summaryrefslogtreecommitdiff
path: root/sdl.c
diff options
context:
space:
mode:
Diffstat (limited to 'sdl.c')
-rw-r--r--sdl.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sdl.c b/sdl.c
index 72a70808db..ec4f93c5ef 100644
--- a/sdl.c
+++ b/sdl.c
@@ -81,6 +81,11 @@ static void sdl_resize(DisplayState *ds, int w, int h)
ds->data = screen->pixels;
ds->linesize = screen->pitch;
ds->depth = screen->format->BitsPerPixel;
+ if (ds->depth == 32 && screen->format->Rshift == 0) {
+ ds->bgr = 1;
+ } else {
+ ds->bgr = 0;
+ }
ds->width = w;
ds->height = h;
}