Allow to unscale the output window with a Ctrl-Alt-u hotkey
authormalc <av1474@comtv.ru>
Thu, 10 Sep 2009 01:15:07 +0000 (05:15 +0400)
committermalc <av1474@comtv.ru>
Thu, 10 Sep 2009 01:16:16 +0000 (05:16 +0400)
Signed-off-by: malc <av1474@comtv.ru>
qemu-doc.texi
sdl.c

index 68a684277b914d02a797b1c0cb946288ff3e6439..2f566b6cec4c09a7d82ab3900ece3ad9efa27ec5 100644 (file)
@@ -241,6 +241,9 @@ During the graphical emulation, you can use the following keys:
 @item Ctrl-Alt-f
 Toggle full screen
 
+@item Ctrl-Alt-u
+Restore the screen's un-scaled dimensions
+
 @item Ctrl-Alt-n
 Switch to virtual console 'n'. Standard console mappings are:
 @table @emph
diff --git a/sdl.c b/sdl.c
index 33edfb8dd95a1fa1ced5ecd054448b36956be048..de63c7f36ec806c26a6a81dad3978c72510d275e 100644 (file)
--- a/sdl.c
+++ b/sdl.c
@@ -569,6 +569,12 @@ static void sdl_refresh(DisplayState *ds)
                         toggle_full_screen(ds);
                         gui_keysym = 1;
                         break;
+                    case 0x16: /* 'u' key on US keyboard */
+                        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 */
                         reset_keys();