summaryrefslogtreecommitdiff
path: root/console.c
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2010-05-21 11:59:14 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2010-06-01 12:53:36 -0500
commitb627808462de92fd2635de16fa7d10b18d806802 (patch)
tree568cb778a0e642c526c0a13fa1621dd2883674f4 /console.c
parent26572b8a0e90ee0c77587173a78fa293a1d2beb6 (diff)
Add support for depth 15 to qemu_default_pixelformat()
Makes qemu_default_pixelformat(15) return pixelformat filled for 15 bit color depth (16 bpp, 5 bits for red,green,blue each, 1 bit unused). Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'console.c')
-rw-r--r--console.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/console.c b/console.c
index 4c42b2810c..698bc10a60 100644
--- a/console.c
+++ b/console.c
@@ -1621,6 +1621,22 @@ PixelFormat qemu_default_pixelformat(int bpp)
pf.depth = bpp == 32 ? 24 : bpp;
switch (bpp) {
+ case 15:
+ pf.bits_per_pixel = 16;
+ pf.bytes_per_pixel = 2;
+ pf.rmask = 0x00007c00;
+ pf.gmask = 0x000003E0;
+ pf.bmask = 0x0000001F;
+ pf.rmax = 31;
+ pf.gmax = 31;
+ pf.bmax = 31;
+ pf.rshift = 10;
+ pf.gshift = 5;
+ pf.bshift = 0;
+ pf.rbits = 5;
+ pf.gbits = 5;
+ pf.bbits = 5;
+ break;
case 16:
pf.rmask = 0x0000F800;
pf.gmask = 0x000007E0;