qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@web.de>
To: TeLeMan <geleman@gmail.com>
Cc: qemu-devel <qemu-devel@nongnu.org>
Subject: [Qemu-devel] Re: [PATCH] sdl: fix setenv for win32
Date: Tue, 25 May 2010 08:20:21 +0200	[thread overview]
Message-ID: <4BFB6C25.3070005@web.de> (raw)
In-Reply-To: <AANLkTikrfTMRjYTSDg-IAvN_pF6cdlbUd4SN08wuFAeO@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1032 bytes --]

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

What a ... pity.

> 
> 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");

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
>      }
> 
>      flags = SDL_INIT_VIDEO | SDL_INIT_NOPARACHUTE;



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 257 bytes --]

      reply	other threads:[~2010-05-25  6:20 UTC|newest]

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

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=4BFB6C25.3070005@web.de \
    --to=jan.kiszka@web.de \
    --cc=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).