Revision 0e1f5a0c hw/g364fb.c
b/hw/g364fb.c | ||
---|---|---|
72 | 72 |
|
73 | 73 |
static void g364fb_draw_graphic(G364State *s, int full_update) |
74 | 74 |
{ |
75 |
switch (s->ds->depth) {
|
|
75 |
switch (ds_get_bits_per_pixel(s->ds)) {
|
|
76 | 76 |
case 8: |
77 | 77 |
g364fb_draw_graphic8(s, full_update); |
78 | 78 |
break; |
... | ... | |
86 | 86 |
g364fb_draw_graphic32(s, full_update); |
87 | 87 |
break; |
88 | 88 |
default: |
89 |
printf("g364fb: unknown depth %d\n", s->ds->depth);
|
|
89 |
printf("g364fb: unknown depth %d\n", ds_get_bits_per_pixel(s->ds));
|
|
90 | 90 |
return; |
91 | 91 |
} |
92 | 92 |
|
... | ... | |
101 | 101 |
if (!full_update) |
102 | 102 |
return; |
103 | 103 |
|
104 |
w = s->scr_width * ((s->ds->depth + 7) >> 3);
|
|
105 |
d = s->ds->data;
|
|
104 |
w = s->scr_width * ((ds_get_bits_per_pixel(s->ds) + 7) >> 3);
|
|
105 |
d = ds_get_data(s->ds);
|
|
106 | 106 |
for(i = 0; i < s->scr_height; i++) { |
107 | 107 |
memset(d, 0, w); |
108 |
d += s->ds->linesize;
|
|
108 |
d += ds_get_linesize(s->ds);
|
|
109 | 109 |
} |
110 | 110 |
|
111 | 111 |
dpy_update(s->ds, 0, 0, s->scr_width, s->scr_height); |
... | ... | |
131 | 131 |
s->graphic_mode = graphic_mode; |
132 | 132 |
full_update = 1; |
133 | 133 |
} |
134 |
if (s->scr_width != s->ds->width || s->scr_height != s->ds->height) {
|
|
134 |
if (s->scr_width != ds_get_width(s->ds) || s->scr_height != ds_get_height(s->ds)) {
|
|
135 | 135 |
qemu_console_resize(s->console, s->scr_width, s->scr_height); |
136 | 136 |
full_update = 1; |
137 | 137 |
} |
Also available in: Unified diff