summaryrefslogtreecommitdiff
path: root/sdl.c
diff options
context:
space:
mode:
authoraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2008-07-23 13:24:33 +0000
committeraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2008-07-23 13:24:33 +0000
commit7bab8c1ff03f33c11ec9fb0274058e7db934a4b8 (patch)
treedf236cc8947d61daf3f70dd7ace88b8ad369515e /sdl.c
parentcff305e4f1072cf1009e4b15a25134e5dd6ed4bd (diff)
downloadqemu-7bab8c1ff03f33c11ec9fb0274058e7db934a4b8.tar.gz
qemu-7bab8c1ff03f33c11ec9fb0274058e7db934a4b8.tar.bz2
qemu-7bab8c1ff03f33c11ec9fb0274058e7db934a4b8.zip
Fix SDL problems with BGR displays (Avi Kivity)
revert qemu's sdl.c rev 1.40 this fixes problems with bgr displays. Signed-off-by: Avi Kivity <avi@qumranet.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4925 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'sdl.c')
-rw-r--r--sdl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sdl.c b/sdl.c
index bac60ea465..719e2bd5a6 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;