1
0
mirror of https://github.com/simh/simh.git synced 2026-01-13 07:19:43 +00:00

VIDEO: Avoid disabling screen saver until a video display is active

This commit is contained in:
Mark Pizzolato 2022-07-15 07:37:17 -10:00
parent 6f4d97f045
commit 8da65638df
2 changed files with 10 additions and 0 deletions

View File

@ -64,6 +64,7 @@ All Simulator updates on Open SIMH will be present in this repository, and any c
- Display current NOAUTOSIZE status in SHOW VERSION output.
- Extend logical name support to include optional unique names for units as well as devices.
- Add extended register sanity checks including duplicate name detection. Fixed simulator devices with duplicate register names.
- Simulators with video devices that may be enabled, no longer disable the screen saver until the video display is presented.
#### Changes to the PDP-11 and VAX simulators
@ -78,6 +79,7 @@ All Simulator updates on Open SIMH will be present in this repository, and any c
- VHD disk formats are available on all disk types (including floppy or DECtape devices).
- Properly size RY drives which also don't have DEC144
- Properly name RQ extended units beyond the initial default units.
- HELP CPU shows supported breakpoint types.
### Updates to the Unibus DUP & Qbus DPV device by Trevor Warwick

View File

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