Hello,
for what I can tell, there is no way for vmware_vga to work correctly
right now. It assumes that the framebuffer bits-per-pixel and the one
from the DisplaySurface are identical (it uses directly the VRAM from
vga.c), but it always assumes 3 bytes per pixel, which is never possible
with the current version of DisplaySurface.
Attached patch fixes that by using ds_get_bits_per_pixel.
s->width = -1;
s->height = -1;
s->svgaid = SVGA_ID;
- s->depth = 24;
+ s->depth = ds_get_bits_per_pixel(s->vga.ds);
s->bypp = (s->depth + 7) >> 3;
s->cursor.on = 0;
s->redraw_fifo_first = 0;
s->scratch_size = SVGA_SCRATCH_SIZE;
s->scratch = (uint32_t *) qemu_malloc(s->scratch_size * 4);
- vmsvga_reset(s);
-
#ifdef EMBED_STDVGA
vga_common_init((VGAState *) s, vga_ram_size);
vga_init((VGAState *) s);
vmsvga_screen_dump,
vmsvga_text_update, &s->vga);
+ vmsvga_reset(s);
+
#ifdef CONFIG_BOCHS_VBE
/* XXX: use optimized standard vga accesses */
cpu_register_physical_memory(VBE_DISPI_LFB_PHYSICAL_ADDRESS,