Skip to contentSkip to conversation

sdl shared buffer support

PATCH New Stefano Stabellini 1 participant 1 message Sep 8, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sdl shared buffer support

This patch implements shared buffer support in sdl.c. It also supports paletted 8 bit colour depths using the palette functions provided by the SDL library.

---

console.h +1 -0
index a054d97..7d252b7 100644
@@ -81,6 +81,7 @@ struct DisplayState {
     int width;
     int height;
     void *opaque;
+    uint32_t *palette;
     struct QEMUTimer *gui_timer;
     uint64_t gui_timer_interval;
     int idle; /* there is nothing to update (window invisible), set by vnc/sdl */
hw/vga.c +1 -0
index 6e40d3d..d5265c0 100644
@@ -2026,6 +2026,7 @@ void vga_common_init(VGAState *s, DisplayState *ds, uint8_t *vga_ram_base,
     s->vram_offset = vga_ram_offset;
     s->vram_size = vga_ram_size;
     s->ds = ds;
+    ds->palette = s->last_palette;
     s->get_bpp = vga_get_bpp;
     s->get_offsets = vga_get_offsets;
     s->get_resolution = vga_get_resolution;
sdl.c +104 -26

182 lines not on this page · raw message