From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=51921 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OGnVE-0000GC-Rc for qemu-devel@nongnu.org; Tue, 25 May 2010 02:20:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OGnVD-0008RV-Q5 for qemu-devel@nongnu.org; Tue, 25 May 2010 02:20:36 -0400 Received: from fmmailgate01.web.de ([217.72.192.221]:45589) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OGnVD-0008RH-BM for qemu-devel@nongnu.org; Tue, 25 May 2010 02:20:35 -0400 Message-ID: <4BFB6C25.3070005@web.de> Date: Tue, 25 May 2010 08:20:21 +0200 From: Jan Kiszka MIME-Version: 1.0 References: In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig8AFA96BD7D40C323234D03DA" Sender: jan.kiszka@web.de Subject: [Qemu-devel] Re: [PATCH] sdl: fix setenv for win32 List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: TeLeMan Cc: qemu-devel This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig8AFA96BD7D40C323234D03DA Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable TeLeMan wrote: > setenv() is not implemented on MinGW, so we have to use putenv(). What a ... pity. >=20 > Signed-off-by: TeLeMan > --- > sdl.c | 4 ++++ > 1 files changed, 4 insertions(+), 0 deletions(-) >=20 > diff --git a/sdl.c b/sdl.c > index add1148..eb4a87f 100644 > --- a/sdl.c > +++ b/sdl.c > @@ -850,7 +850,11 @@ void sdl_display_init(DisplayState *ds, int > full_screen, int no_frame) > gui_noframe =3D 1; >=20 > if (!full_screen) { > +#ifdef _WIN32 > + putenv("SDL_VIDEO_ALLOW_SCREENSAVER=3D1"); This is not equivalent, the user will no longer be able to control the value by setting it before starting qemu. Let's check for the existence of SDL_VIDEO_ALLOW_SCREENSAVER first, set it if it's not yet there, and do this for all platforms, leaving a comment about the WIN32 dependency behind. Jan > +#else > setenv("SDL_VIDEO_ALLOW_SCREENSAVER", "1", 0); > +#endif > } >=20 > flags =3D SDL_INIT_VIDEO | SDL_INIT_NOPARACHUTE; --------------enig8AFA96BD7D40C323234D03DA Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iEYEARECAAYFAkv7bDAACgkQitSsb3rl5xThGwCfTB6MNUW7bp3B9kalaal/Vp65 iOYAoNX2rpXIIHY3i+lJRrPAL4eBFriT =aYJU -----END PGP SIGNATURE----- --------------enig8AFA96BD7D40C323234D03DA--