From: Blue Swirl <blauwirbel@gmail.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [4936] Fix detection of 15 bit display depth
Date: Thu, 24 Jul 2008 11:25:31 +0000 [thread overview]
Message-ID: <E1KLywt-00039z-Q9@cvs.savannah.gnu.org> (raw)
Revision: 4936
http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=4936
Author: blueswir1
Date: 2008-07-24 11:25:30 +0000 (Thu, 24 Jul 2008)
Log Message:
-----------
Fix detection of 15 bit display depth
Modified Paths:
--------------
trunk/sdl.c
Modified: trunk/sdl.c
===================================================================
--- trunk/sdl.c 2008-07-23 20:01:27 UTC (rev 4935)
+++ trunk/sdl.c 2008-07-24 11:25:30 UTC (rev 4936)
@@ -89,6 +89,17 @@
ds->data = screen->pixels;
ds->linesize = screen->pitch;
ds->depth = screen->format->BitsPerPixel;
+ /* SDL BitsPerPixel never indicates any values other than
+ multiples of 8, so we need to check for strange depths. */
+ if (ds->depth == 16) {
+ uint32_t mask;
+
+ mask = screen->format->Rmask;
+ mask |= screen->format->Gmask;
+ mask |= screen->format->Bmask;
+ if ((mask & 0x8000) == 0)
+ ds->depth = 15;
+ }
if (ds->depth == 32 && screen->format->Rshift == 0) {
ds->bgr = 1;
} else {
reply other threads:[~2008-07-24 11:25 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E1KLywt-00039z-Q9@cvs.savannah.gnu.org \
--to=blauwirbel@gmail.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).