]> git.proxmox.com Git - qemu.git/commitdiff
sdl: Avoid redundant scaling deactivation
authorJan Kiszka <jan.kiszka@siemens.com>
Sat, 30 Jul 2011 09:39:06 +0000 (11:39 +0200)
committerAnthony Liguori <aliguori@us.ibm.com>
Fri, 5 Aug 2011 15:57:34 +0000 (10:57 -0500)
Prevents screen flickering.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
ui/sdl.c

index 9a92b47f73c9db99b5591ac05142eac906fde5c2..1563ee1965ae1c0dd4a3638408dabd00e1794afe 100644 (file)
--- a/ui/sdl.c
+++ b/ui/sdl.c
@@ -583,10 +583,12 @@ static void sdl_refresh(DisplayState *ds)
                         gui_keysym = 1;
                         break;
                     case 0x16: /* 'u' key on US keyboard */
-                        scaling_active = 0;
-                        sdl_resize(ds);
-                        vga_hw_invalidate();
-                        vga_hw_update();
+                        if (scaling_active) {
+                            scaling_active = 0;
+                            sdl_resize(ds);
+                            vga_hw_invalidate();
+                            vga_hw_update();
+                        }
                         break;
                     case 0x02 ... 0x0a: /* '1' to '9' keys */
                         /* Reset the modifiers sent to the current console */