Attempt to fix incorrect colours on some BGR displays

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2974 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
blueswir1 2007-06-10 16:07:38 +00:00
parent 9447084492
commit b29169d265
4 changed files with 74 additions and 8 deletions

2
sdl.c
View file

@ -87,7 +87,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 (ds->depth == 32 && screen->format->Rshift == 0) {
if (screen->format->Bshift > screen->format->Rshift) {
ds->bgr = 1;
} else {
ds->bgr = 0;