mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-09-09 08:17:53 -06:00
sdl: Do not disable screensaver by default
Unless we are running in full-screen mode, QEMU's SDL window should not disable the host's screensaver. The user can still change this behaviour by setting the environment variable SDL_VIDEO_ALLOW_SCREENSAVER as desired. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
9c678ccd15
commit
111f8ec99b
1 changed files with 4 additions and 0 deletions
4
sdl.c
4
sdl.c
|
@ -855,6 +855,10 @@ void sdl_display_init(DisplayState *ds, int full_screen, int no_frame)
|
||||||
if (no_frame)
|
if (no_frame)
|
||||||
gui_noframe = 1;
|
gui_noframe = 1;
|
||||||
|
|
||||||
|
if (!full_screen) {
|
||||||
|
setenv("SDL_VIDEO_ALLOW_SCREENSAVER", "1", 0);
|
||||||
|
}
|
||||||
|
|
||||||
flags = SDL_INIT_VIDEO | SDL_INIT_NOPARACHUTE;
|
flags = SDL_INIT_VIDEO | SDL_INIT_NOPARACHUTE;
|
||||||
if (SDL_Init (flags)) {
|
if (SDL_Init (flags)) {
|
||||||
fprintf(stderr, "Could not initialize SDL(%s) - exiting\n",
|
fprintf(stderr, "Could not initialize SDL(%s) - exiting\n",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue