From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40849) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xz5Kh-0000zt-A3 for qemu-devel@nongnu.org; Thu, 11 Dec 2014 10:07:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xz5Kb-0002qA-4a for qemu-devel@nongnu.org; Thu, 11 Dec 2014 10:07:11 -0500 Received: from mx1.redhat.com ([209.132.183.28]:33446) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xz5Ka-0002q3-Sc for qemu-devel@nongnu.org; Thu, 11 Dec 2014 10:07:05 -0500 Message-ID: <5489B313.80706@redhat.com> Date: Thu, 11 Dec 2014 16:06:59 +0100 From: Max Reitz MIME-Version: 1.0 References: <1418294973-21790-1-git-send-email-kraxel@redhat.com> <1418294973-21790-7-git-send-email-kraxel@redhat.com> In-Reply-To: <1418294973-21790-7-git-send-email-kraxel@redhat.com> Content-Type: text/plain; charset=iso-8859-15; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 06/10] sdl2: overhaul window size handling List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann , qemu-devel@nongnu.org Cc: Anthony Liguori 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 > --- > 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