diff --git a/qemu-doc.texi b/qemu-doc.texi index 47e1991712de827d821671b2cddc0bb2469affa4..31199f6004f414cd380eee45715c72913f96ba04 100644 --- a/qemu-doc.texi +++ b/qemu-doc.texi @@ -288,6 +288,14 @@ then the modifier is Ctrl-Alt-Shift (instead of Ctrl-Alt) and if you use @kindex Ctrl-Alt-f Toggle full screen +@item Ctrl-Alt-+ +@kindex Ctrl-Alt-+ +Enlarge the screen + +@item Ctrl-Alt-- +@kindex Ctrl-Alt-- +Shrink the screen + @item Ctrl-Alt-u @kindex Ctrl-Alt-u Restore the screen's un-scaled dimensions diff --git a/ui/sdl.c b/ui/sdl.c index e8ac3bb65bca8f972c53aa864d2311924778b5cf..fc63c8eec5499a04696a1069ce9889797c6da378 100644 --- a/ui/sdl.c +++ b/ui/sdl.c @@ -651,6 +651,19 @@ static void sdl_refresh(DisplayState *ds) absolute_mouse_grab(); } break; + case 0x1b: /* '+' */ + case 0x35: /* '-' */ + if (!gui_fullscreen) { + int width = MAX(real_screen->w + + (keycode == 0x1b ? 50 : -50), 160); + int height = (ds_get_height(ds) * width) / + ds_get_width(ds); + + sdl_scale(ds, width, height); + vga_hw_invalidate(); + vga_hw_update(); + gui_keysym = 1; + } default: break; }