From patchwork Tue May 25 02:23:24 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: TeLeMan X-Patchwork-Id: 53486 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id C1177B7D52 for ; Tue, 25 May 2010 12:24:08 +1000 (EST) Received: from localhost ([127.0.0.1]:54240 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OGjoK-0001gv-D7 for incoming@patchwork.ozlabs.org; Mon, 24 May 2010 22:24:04 -0400 Received: from [140.186.70.92] (port=59709 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OGjnk-0001ff-7e for qemu-devel@nongnu.org; Mon, 24 May 2010 22:23:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OGjnj-0007EL-5E for qemu-devel@nongnu.org; Mon, 24 May 2010 22:23:28 -0400 Received: from mail-px0-f173.google.com ([209.85.212.173]:33692) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OGjnj-0007E9-0t for qemu-devel@nongnu.org; Mon, 24 May 2010 22:23:27 -0400 Received: by pxi19 with SMTP id 19so1827571pxi.4 for ; Mon, 24 May 2010 19:23:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=f2o/zJ7hVQF/n70l8XhXPZDt/n2Sqj+lst7rRdOZ3M4=; b=EcC8a5xRwoWdtaSU8i1gWiH0loFr3lmA9SLnTeE538V2kQCCa6ATdojvcZJezLevUD ltEUOsOGCM9rg77e3fURkn8VqXjl+o+St/HPsLUze2y9FoyHUHXOU1PyQ4CaG4ZVo4o/ SWjWSDk8c2bWNoESW38wESsuu31w+wAUQ7vH4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=mITTbFfnn0M5BRX9tmDSvzZNL17E5brf4MBIffRo42SereEwd7sYbI9Q7jUoiHN6B5 ywEYzCI5qN4ZFw94z5id4vX0pdGedrhLhbdvJOrosWQ6eSIhOdlLzLuf8YUosoW/CXpz hdfKRtdlCnQ8uwlUTbcccGuMSzd9/ZhJLf9Aw= MIME-Version: 1.0 Received: by 10.141.108.21 with SMTP id k21mr4654478rvm.170.1274754204770; Mon, 24 May 2010 19:23:24 -0700 (PDT) Received: by 10.141.48.13 with HTTP; Mon, 24 May 2010 19:23:24 -0700 (PDT) Date: Tue, 25 May 2010 10:23:24 +0800 Message-ID: From: TeLeMan To: qemu-devel X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: [Qemu-devel] [PATCH] sdl: fix setenv for win32 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org setenv() is not implemented on MinGW, so we have to use putenv(). Signed-off-by: TeLeMan --- sdl.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) flags = SDL_INIT_VIDEO | SDL_INIT_NOPARACHUTE; 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 = 1; if (!full_screen) { +#ifdef _WIN32 + putenv("SDL_VIDEO_ALLOW_SCREENSAVER=1"); +#else setenv("SDL_VIDEO_ALLOW_SCREENSAVER", "1", 0); +#endif }