From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39063) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xz6cv-00048W-QE for qemu-devel@nongnu.org; Thu, 11 Dec 2014 11:30:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xz6cn-0005WG-E9 for qemu-devel@nongnu.org; Thu, 11 Dec 2014 11:30:05 -0500 Received: from mx1.redhat.com ([209.132.183.28]:53512) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xz6cn-0005V9-7N for qemu-devel@nongnu.org; Thu, 11 Dec 2014 11:29:57 -0500 Message-ID: <5489AD55.5010408@redhat.com> Date: Thu, 11 Dec 2014 15:42:29 +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 [snip] > static void sdl_switch(DisplayChangeListener *dcl, > DisplaySurface *new_surface) > { > struct sdl2_console *scon = container_of(dcl, struct sdl2_console, dcl); > - int format = 0; > - int idx = scon->idx; > DisplaySurface *old_surface = scon->surface; > + int format = 0; Moving "format" seems unnecessary, but of course it doesn't matter. Reviewed-by: Max Reitz