mirror of
https://github.com/simh/simh.git
synced 2026-02-06 00:15:40 +00:00
VIDEO: Avoid disabling screen saver until a video display is active
This commit is contained in:
@@ -509,6 +509,7 @@ main_argc = argc;
|
||||
main_argv = argv;
|
||||
|
||||
SDL_SetHint (SDL_HINT_RENDER_DRIVER, "software");
|
||||
SDL_SetHint (SDL_HINT_VIDEO_ALLOW_SCREENSAVER, "1");
|
||||
|
||||
status = SDL_Init (SDL_INIT_VIDEO);
|
||||
|
||||
@@ -1961,6 +1962,13 @@ if (!initialized) {
|
||||
* and should be allocated with SDL_RegisterEvents()
|
||||
*/
|
||||
eventtypes[SDL_USEREVENT] = "USEREVENT";
|
||||
|
||||
/**
|
||||
* For consistency with behavior since SDL 2.0.2, we disable
|
||||
* the screen saver when a video display is enabled.
|
||||
*/
|
||||
if (SDL_IsScreenSaverEnabled () == SDL_TRUE)
|
||||
SDL_DisableScreenSaver ();
|
||||
}
|
||||
|
||||
sim_debug (SIM_VID_DBG_VIDEO|SIM_VID_DBG_KEY|SIM_VID_DBG_MOUSE, vptr0->vid_dev, "vid_thread() - Starting\n");
|
||||
|
||||
Reference in New Issue
Block a user