diff options
author | Jan Kiszka <jan.kiszka@siemens.com> | 2011-07-30 11:39:08 +0200 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2011-08-05 10:57:35 -0500 |
commit | 2a8ad7da542dc52b98aff3219e1c202bb1b09895 (patch) | |
tree | 9b26b1b0fa13b79a21ce0e3bbf78ac5542fa261e /ui/sdl.c | |
parent | d71680c8f1d639bfb31958b25dfb806f6b8cda56 (diff) | |
download | qemu-2a8ad7da542dc52b98aff3219e1c202bb1b09895.tar.gz qemu-2a8ad7da542dc52b98aff3219e1c202bb1b09895.tar.bz2 qemu-2a8ad7da542dc52b98aff3219e1c202bb1b09895.zip |
sdl: Fix full screen toggling from scaled mode
When switching to full screen mode from a scaled window, we need to
resize to DisplayState's dimension, not the scaled "real" screen size.
Moreover, scaling mode may have manipulated the bpp. So we need to
restore it from the DisplayState as well.
CC: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'ui/sdl.c')
-rw-r--r-- | ui/sdl.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -529,7 +529,8 @@ static void sdl_send_mouse_event(int dx, int dy, int dz, int x, int y, int state static void toggle_full_screen(DisplayState *ds) { gui_fullscreen = !gui_fullscreen; - do_sdl_resize(real_screen->w, real_screen->h, real_screen->format->BitsPerPixel); + do_sdl_resize(ds_get_width(ds), ds_get_height(ds), + ds_get_bits_per_pixel(ds)); if (gui_fullscreen) { scaling_active = 0; gui_saved_grab = gui_grab; |