qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 1 of 7] few more accessors


From: Anthony Liguori
Subject: Re: [Qemu-devel] [PATCH 1 of 7] few more accessors
Date: Tue, 02 Dec 2008 13:25:10 -0600
User-agent: Thunderbird 2.0.0.17 (X11/20080925)

Stefano Stabellini wrote:
This patch introduces few more DisplayState accessors in hw/sm501.c.

Signed-off-by: Stefano Stabellini <address@hidden>

diff -r d8ccc2d27955 hw/sm501.c
--- a/hw/sm501.c        Mon Nov 24 20:21:41 2008 +0000
+++ b/hw/sm501.c        Wed Nov 26 16:33:07 2008 +0000
@@ -955,7 +955,7 @@
static inline int get_depth_index(DisplayState *s)
 {
-    switch(s->depth) {
+    switch(ds_get_bits_per_pixel(s)) {
     default:
     case 8:
        return 0;
@@ -985,7 +985,7 @@
uint8_t * src = s->local_mem;
     int src_bpp = 0;
-    int dst_bpp = s->ds->depth / 8 + (s->ds->depth % 8 ? 1 : 0);
+    int dst_bpp = ds_get_bytes_per_pixel(s->ds) + 
(ds_get_bits_per_pixel(s->ds) % 8 ? 1 : 0);

There isn't a ds_get_bytes_per_pixel in console.h so this breaks the build. Is your patch missing something perhaps?

Regards,

Anthony Liguori





reply via email to

[Prev in Thread] Current Thread [Next in Thread]