qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 06/10] sdl2: overhaul window size handling


From: Max Reitz
Subject: Re: [Qemu-devel] [PATCH 06/10] sdl2: overhaul window size handling
Date: Thu, 11 Dec 2014 16:06:59 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0

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 <address@hidden>
---
  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

[Prev in Thread] Current Thread [Next in Thread]