aboutsummaryrefslogtreecommitdiff
path: root/ui/sdl.c
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2013-02-28 15:03:04 +0100
committerGerd Hoffmann <kraxel@redhat.com>2013-03-18 10:21:58 +0100
commitc12aeb860c63ba83190f962e2f0a1c5fe18ad3a6 (patch)
tree4ff23dade55c45cee495d330ad2a2c0d305e760d /ui/sdl.c
parentda229ef3b3c5709b01d62e7a6e213b31bca33d16 (diff)
console: rework DisplaySurface handling [dcl/ui side]
Replace the dpy_gfx_resize and dpy_gfx_setdata DisplayChangeListener callbacks with a dpy_gfx_switch callback which notifies the ui code when the framebuffer backing storage changes. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'ui/sdl.c')
-rw-r--r--ui/sdl.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/ui/sdl.c b/ui/sdl.c
index fc4dc1b18d..85eefdf4ab 100644
--- a/ui/sdl.c
+++ b/ui/sdl.c
@@ -117,8 +117,9 @@ static void do_sdl_resize(int width, int height, int bpp)
}
}
-static void sdl_resize(DisplayChangeListener *dcl,
- DisplayState *ds)
+static void sdl_switch(DisplayChangeListener *dcl,
+ DisplayState *ds,
+ DisplaySurface *surface)
{
if (!scaling_active) {
do_sdl_resize(ds_get_width(ds), ds_get_height(ds), 0);
@@ -513,7 +514,7 @@ static void handle_keydown(DisplayState *ds, SDL_Event *ev)
case 0x16: /* 'u' key on US keyboard */
if (scaling_active) {
scaling_active = 0;
- sdl_resize(dcl, ds);
+ sdl_switch(dcl, ds, ds->surface);
vga_hw_invalidate();
vga_hw_update();
}
@@ -856,9 +857,8 @@ static void sdl_cleanup(void)
static const DisplayChangeListenerOps dcl_ops = {
.dpy_name = "sdl",
.dpy_gfx_update = sdl_update,
- .dpy_gfx_resize = sdl_resize,
+ .dpy_gfx_switch = sdl_switch,
.dpy_refresh = sdl_refresh,
- .dpy_gfx_setdata = sdl_setdata,
.dpy_mouse_set = sdl_mouse_warp,
.dpy_cursor_define = sdl_mouse_define,
};