qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: TeLeMan <geleman@gmail.com>
To: qemu-devel <qemu-devel@nongnu.org>
Subject: [Qemu-devel] [PATCH] sdl: fix setenv for win32
Date: Tue, 25 May 2010 10:23:24 +0800	[thread overview]
Message-ID: <AANLkTikrfTMRjYTSDg-IAvN_pF6cdlbUd4SN08wuFAeO@mail.gmail.com> (raw)

setenv() is not implemented on MinGW, so we have to use putenv().

Signed-off-by: TeLeMan <geleman@gmail.com>
---
 sdl.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

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
     }

     flags = SDL_INIT_VIDEO | SDL_INIT_NOPARACHUTE;
-- 
1.6.5.1.1367.gcd48
--
SUN OF A BEACH

             reply	other threads:[~2010-05-25  2:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-25  2:23 TeLeMan [this message]
2010-05-25  6:20 ` [Qemu-devel] Re: [PATCH] sdl: fix setenv for win32 Jan Kiszka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AANLkTikrfTMRjYTSDg-IAvN_pF6cdlbUd4SN08wuFAeO@mail.gmail.com \
    --to=geleman@gmail.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).