1
0
mirror of https://github.com/simh/simh.git synced 2026-01-25 19:56:25 +00:00

VIDEO: Add API for querying and setting fullscreen mode.

This commit is contained in:
Lars Brinkhoff
2020-07-08 08:28:35 +02:00
parent 9711fc017b
commit d93bfe62de
2 changed files with 28 additions and 0 deletions

View File

@@ -1404,6 +1404,20 @@ if (SDL_SemWait (vid_mouse_events.sem) == 0) {
}
}
t_bool vid_is_fullscreen (void)
{
return SDL_GetWindowFlags (vid_window) & SDL_WINDOW_FULLSCREEN_DESKTOP;
}
t_stat vid_set_fullscreen (t_bool flag)
{
if (flag)
SDL_SetWindowFullscreen (vid_window, SDL_WINDOW_FULLSCREEN_DESKTOP);
else
SDL_SetWindowFullscreen (vid_window, 0);
return SCPE_OK;
}
void vid_update (void)
{
SDL_Rect vid_dst;
@@ -2368,4 +2382,16 @@ t_stat vid_screenshot (const char *filename)
sim_printf ("video support unavailable\n");
return SCPE_NOFNC|SCPE_NOMESSAGE;
}
t_bool vid_is_fullscreen (void)
{
sim_printf ("video support unavailable\n");
return FALSE;
}
t_stat vid_set_fullscreen (t_bool flag)
{
sim_printf ("video support unavailable\n");
return SCPE_OK;
}
#endif /* defined(USE_SIM_VIDEO) */