diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2013-02-28 15:03:04 +0100 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2013-03-18 10:21:58 +0100 |
commit | c12aeb860c63ba83190f962e2f0a1c5fe18ad3a6 (patch) | |
tree | 4ff23dade55c45cee495d330ad2a2c0d305e760d /ui/sdl.c | |
parent | da229ef3b3c5709b01d62e7a6e213b31bca33d16 (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.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -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, }; |