From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JUAxd-0004vc-7B for qemu-devel@nongnu.org; Tue, 26 Feb 2008 20:19:53 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JUAxb-0004t3-4e for qemu-devel@nongnu.org; Tue, 26 Feb 2008 20:19:52 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JUAxa-0004sm-Qu for qemu-devel@nongnu.org; Tue, 26 Feb 2008 20:19:50 -0500 Received: from mail.gmx.net ([213.165.64.20]) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1JUAxa-0004dl-8R for qemu-devel@nongnu.org; Tue, 26 Feb 2008 20:19:50 -0500 Message-ID: <47C4BAB3.7050302@gmx.at> Date: Wed, 27 Feb 2008 02:19:47 +0100 From: Andreas Winkelbauer MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] don't die if switching to fullscreen mode fails References: alpine.LSU.1.00.0802261253050.17164@racer.site Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org hi, > Wow. This patch is messy, if I may say so. There must be a more > elegant way to do this, especially given the fact that you remove > atexit(sdl_cleanup)s without explanation. well, the diff output is messy, because I added sdl_resize2() above sdl_resize() to avoid adding a forward declaration. the patch itself might be messy as well, but that depends on your point of view. I don't think it is too messy. I did it that way because I wanted the patch to be as less invasively as possible. I did not change any existing function prototypes and all the changes are restricted to one source file. just as an example: changing the function prototype of sdl_resize() would lead to much more changes at other places as well to make things consistent again. I don't think this would make the patch less messy. I didn't remove the atexit() call, it is just moved some lines upwards (look carefully) because now there is a check if the initial resize to 640x400 fails. If it fails we call exit() and that means the call to atexit() must be done before a possible call to exit(). However, I agree with you that there should exist another solution. Does qemu have access to the maximum resolution of the host display? cheers, Andi