On 2014-12-11 at 11:49, Gerd Hoffmann wrote:
Split do_sdl_resize function (which does alot more than just resizing)
into three: sdl2_window_{create,destroy,resize}.

Fix SDL_Renderer handling: must be guest display size not host window
size, and SDL2 will magically handle all scaling for us.

Make fullscreen actually enter fullscreen mode and simplify the code.
There is no need to store the original window size, the window manager
will do that for us.

Signed-off-by: Gerd Hoffmann <kra...@redhat.com>
---
  ui/sdl2.c | 172 +++++++++++++++++++++++++++++---------------------------------
  1 file changed, 79 insertions(+), 93 deletions(-)

diff --git a/ui/sdl2.c b/ui/sdl2.c
index 47a757a..70f79a5 100644
--- a/ui/sdl2.c
+++ b/ui/sdl2.c
@@ -439,12 +424,14 @@ static void handle_keydown(SDL_Event *ev)
                              160);
                  height = (surface_height(scon->surface) * width) /
                      surface_width(scon->surface);
-
+                fprintf(stderr, "%s: scale to %dx%d\n",
+                        __func__, width, height);

I forgot to ask: What's the reason for this fprintf()? Thanks to "#if 0" it doesn't do anything, but it seems kind of strange if this block would not be commented out...

Max

Reply via email to