From patchwork Tue May 25 02:23:24 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: sdl: fix setenv for win32 Date: Mon, 24 May 2010 16:23:24 -0000 From: TeLeMan X-Patchwork-Id: 53486 Message-Id: To: qemu-devel 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 }