mirror of
https://github.com/open-simh/simh.git
synced 2026-01-28 21:01:53 +00:00
video: don't disable the screen saver (#57)
This fixes issue #38 by setting the SDL_HINT_VIDEO_ALLOW_SCREENSAVER hint to 1, leaving the screen saver enabled. SDL 2.0.2 had changed the default to disable the screen saver. Co-authored-by: Paul Koning <ni1d@arrl.net>
This commit is contained in:
10
sim_video.c
10
sim_video.c
@@ -509,6 +509,11 @@ main_argc = argc;
|
||||
main_argv = argv;
|
||||
|
||||
SDL_SetHint (SDL_HINT_RENDER_DRIVER, "software");
|
||||
#if defined (SDL_HINT_VIDEO_ALLOW_SCREENSAVER)
|
||||
/* If this hint is defined, the default is to disable the screen saver.
|
||||
We want to leave the screen saver enabled. */
|
||||
SDL_SetHint (SDL_HINT_VIDEO_ALLOW_SCREENSAVER, "1");
|
||||
#endif
|
||||
|
||||
status = SDL_Init (SDL_INIT_VIDEO);
|
||||
|
||||
@@ -2138,6 +2143,11 @@ VID_DISPLAY *vptr = (VID_DISPLAY *)arg;
|
||||
int stat;
|
||||
|
||||
SDL_SetHint (SDL_HINT_RENDER_DRIVER, "software");
|
||||
#if defined (SDL_HINT_VIDEO_ALLOW_SCREENSAVER)
|
||||
/* If this hint is defined, the default is to disable the screen saver.
|
||||
We want to leave the screen saver enabled. */
|
||||
SDL_SetHint (SDL_HINT_VIDEO_ALLOW_SCREENSAVER, "1");
|
||||
#endif
|
||||
|
||||
stat = SDL_Init (SDL_INIT_VIDEO);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user