| Submitter | Stefan Weil |
|---|---|
| Date | April 30, 2012, 4:55 p.m. |
| Message ID | <1335804945-7720-1-git-send-email-sw@weilnetz.de> |
| Download | mbox | patch |
| Permalink | /patch/155925/ |
| State | New |
| Headers | show |
Comments
Am 30.04.2012 18:55, schrieb Stefan Weil: > SDL scaling uses a broken version of SDL_rotozoom > which does out-of-bounds memory access. > > Disable it for QEMU 1.1 until a better solution is found. > > Cc: Anthony Liguori<aliguori@us.ibm.com> > Signed-off-by: Stefan Weil<sw@weilnetz.de> > --- > qemu-doc.texi | 4 ++-- > ui/sdl.c | 12 ++++++++++++ > 2 files changed, 14 insertions(+), 2 deletions(-) > > diff --git a/qemu-doc.texi b/qemu-doc.texi > index 9e07ba6..a72289f 100644 > --- a/qemu-doc.texi > +++ b/qemu-doc.texi > @@ -290,11 +290,11 @@ Toggle full screen > > @item Ctrl-Alt-+ > @kindex Ctrl-Alt-+ > -Enlarge the screen > +Enlarge the screen. This function is currently disabled. > > @item Ctrl-Alt-- > @kindex Ctrl-Alt-- > -Shrink the screen > +Shrink the screen. This function is currently disabled. > > @item Ctrl-Alt-u > @kindex Ctrl-Alt-u > diff --git a/ui/sdl.c b/ui/sdl.c > index f6f711c..8700b7a 100644 > --- a/ui/sdl.c > +++ b/ui/sdl.c > @@ -34,6 +34,13 @@ > #include "x_keymap.h" > #include "sdl_zoom.h" > > +#if 0 > +/* Scaling with SDL is broken, therefore it is disabled by default. > + * It can be enabled by defining the following macro. > + */ > +# define CONFIG_SDL_SCALING > +#endif > + > static DisplayChangeListener *dcl; > static SDL_Surface *real_screen; > static SDL_Surface *guest_screen = NULL; > @@ -638,6 +645,7 @@ static void handle_keydown(DisplayState *ds, SDL_Event *ev) > break; > case 0x1b: /* '+' */ > case 0x35: /* '-' */ > +#if defined(CONFIG_SDL_SCALING) > if (!gui_fullscreen) { > int width = MAX(real_screen->w + (keycode == 0x1b ? 50 : -50), > 160); > @@ -648,6 +656,8 @@ static void handle_keydown(DisplayState *ds, SDL_Event *ev) > vga_hw_update(); > gui_keysym = 1; > } > +#endif /* CONFIG_SDL_SCALING */ > + break; > default: > break; > } > @@ -889,9 +899,11 @@ static void sdl_refresh(DisplayState *ds) > handle_activation(ds, ev); > break; > case SDL_VIDEORESIZE: > +#if defined(CONFIG_SDL_SCALING) > sdl_scale(ds, ev->resize.w, ev->resize.h); > vga_hw_invalidate(); > vga_hw_update(); > +#endif > break; > default: > break; > Ping? This patch was sent for version 1.1 two weeks ago... Regards, Stefan Weil
Patch
diff --git a/qemu-doc.texi b/qemu-doc.texi index 9e07ba6..a72289f 100644 --- a/qemu-doc.texi +++ b/qemu-doc.texi @@ -290,11 +290,11 @@ Toggle full screen @item Ctrl-Alt-+ @kindex Ctrl-Alt-+ -Enlarge the screen +Enlarge the screen. This function is currently disabled. @item Ctrl-Alt-- @kindex Ctrl-Alt-- -Shrink the screen +Shrink the screen. This function is currently disabled. @item Ctrl-Alt-u @kindex Ctrl-Alt-u diff --git a/ui/sdl.c b/ui/sdl.c index f6f711c..8700b7a 100644 --- a/ui/sdl.c +++ b/ui/sdl.c @@ -34,6 +34,13 @@ #include "x_keymap.h" #include "sdl_zoom.h" +#if 0 +/* Scaling with SDL is broken, therefore it is disabled by default. + * It can be enabled by defining the following macro. + */ +# define CONFIG_SDL_SCALING +#endif + static DisplayChangeListener *dcl; static SDL_Surface *real_screen; static SDL_Surface *guest_screen = NULL; @@ -638,6 +645,7 @@ static void handle_keydown(DisplayState *ds, SDL_Event *ev) break; case 0x1b: /* '+' */ case 0x35: /* '-' */ +#if defined(CONFIG_SDL_SCALING) if (!gui_fullscreen) { int width = MAX(real_screen->w + (keycode == 0x1b ? 50 : -50), 160); @@ -648,6 +656,8 @@ static void handle_keydown(DisplayState *ds, SDL_Event *ev) vga_hw_update(); gui_keysym = 1; } +#endif /* CONFIG_SDL_SCALING */ + break; default: break; } @@ -889,9 +899,11 @@ static void sdl_refresh(DisplayState *ds) handle_activation(ds, ev); break; case SDL_VIDEORESIZE: +#if defined(CONFIG_SDL_SCALING) sdl_scale(ds, ev->resize.w, ev->resize.h); vga_hw_invalidate(); vga_hw_update(); +#endif break; default: break;
SDL scaling uses a broken version of SDL_rotozoom which does out-of-bounds memory access. Disable it for QEMU 1.1 until a better solution is found. Cc: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Stefan Weil <sw@weilnetz.de> --- qemu-doc.texi | 4 ++-- ui/sdl.c | 12 ++++++++++++ 2 files changed, 14 insertions(+), 2 deletions(-)