Skip to contentSkip to conversation

Fix color problems with sdl on bgr displays

PATCH In review Avi Kivity 2 participants 3 messages Oct 14, 2007 2 messages not in the archive KVM

lore
Share & tools
lore

Avi Kivity

author
#0 lore raw

PATCH 1/1 Fix color problems with sdl on bgr displays

Some kvm users complained that the blue and red channels are flipped on their displays. Reverting sdl.c rev 1.40 fixed that problem, so apparently that commit made the problem larger than it was previously.

Attached a patch the removes the commit and fixes the problem. Please apply.

Signature · 1 line
error compiling committee.c: too many arguments to function

Index: sdl.c
===================================================================
RCS file: /sources/qemu/qemu/sdl.c,v
retrieving revision 1.44

sdl.c +1 -1
diff -u -r1.44 sdl.c
@@ -87,7 +87,7 @@
     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;

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/

_______________________________________________
kvm-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/kvm-devel

A message that is not in the archive (sent off-list or not yet received): 47121F0F.9020804-atKUWr5tajBWk0Htik3J/[email protected]

#2 lore raw
Quoted 6 lines · Avi Kivity

Some kvm users complained that the blue and red channels are flipped on their displays. Reverting sdl.c rev 1.40 fixed that problem, so apparently that commit made the problem larger than it was previously.

Attached a patch the removes the commit and fixes the problem. Please apply.

But this commit was previously reported as the best solution for OSX (Intel, PPC) and Linux/PPC:
http://article.gmane.org/gmane.comp.emulators.qemu/18071

What kind of machines are the users using?

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/

A message that is not in the archive (sent off-list or not yet received): f43fc5580710140727r19452244i4ad86cc31b50e7f3-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org

author
#4 lore raw
Quoted 10 lines · Blue Swirl
Quoted 7 lines · Avi Kivity

Some kvm users complained that the blue and red channels are flipped on their displays. Reverting sdl.c rev 1.40 fixed that problem, so apparently that commit made the problem larger than it was previously.

Attached a patch the removes the commit and fixes the problem. Please apply.

Quoted 6 lines

But this commit was previously reported as the best solution for OSX (Intel, PPC) and Linux/PPC:
http://article.gmane.org/gmane.comp.emulators.qemu/18071

What kind of machines are the users using?

No idea, but I got two xdpyinfo logs and both indicated a bgr display.

Perhaps we see here a difference between how SDL behaves on different platforms. Or maybe the test needs to be more subtle.

I haven't had any reports of wrong colors before; of course kvm users don't run Linux/PPC os OSX/anything.

Signature · 8 lines
error compiling committee.c: too many arguments to function


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/