Add video_off timeout in MiSTer.ini

This commit is contained in:
Sorgelig
2022-08-04 02:43:58 +08:00
parent 38d8519711
commit 3192baa0f3
5 changed files with 59 additions and 45 deletions

View File

@@ -1043,6 +1043,7 @@ void HandleUI(void)
{
static int menu_visible = 1;
static unsigned long timeout = 0;
static unsigned long off_timeout = 0;
if (!video_fb_state() && cfg.fb_terminal)
{
if (timeout && CheckTimer(timeout))
@@ -1058,9 +1059,16 @@ void HandleUI(void)
{
menu_visible--;
video_menu_bg(user_io_status_get("[3:1]"), 2);
off_timeout = cfg.video_off ? GetTimer(cfg.video_off * 1000) : 0;
}
}
if (off_timeout && CheckTimer(off_timeout) && menu_visible < 0)
{
off_timeout = 0;
video_menu_bg(user_io_status_get("[3:1]"), 3);
}
if (c || menustate != MENU_FILE_SELECT2)
{
timeout = 0;