Fix FS#13319

Change-Id: Ia995e2de51f5d8984dffa90b97d4babb98f21399
This commit is contained in:
Christian Soffke 2021-11-19 17:55:10 +01:00 committed by Solomon Peachy
parent 6325971451
commit 64192cdfa8

View file

@ -659,9 +659,16 @@ int do_shortcut_menu(void *ignored)
} }
break; break;
case SHORTCUT_SETTING: case SHORTCUT_SETTING:
{
int old_sleeptimer_duration = global_settings.sleeptimer_duration;
do_setting_screen(sc->u.setting, do_setting_screen(sc->u.setting,
sc->name[0] ? sc->name : P2STR(ID2P(sc->u.setting->lang_id)),NULL); sc->name[0] ? sc->name : P2STR(ID2P(sc->u.setting->lang_id)),NULL);
if (old_sleeptimer_duration != global_settings.sleeptimer_duration &&
get_sleep_timer())
set_sleeptimer_duration(global_settings.sleeptimer_duration);
break; break;
}
case SHORTCUT_DEBUGITEM: case SHORTCUT_DEBUGITEM:
run_debug_screen(sc->u.path); run_debug_screen(sc->u.path);
break; break;
@ -683,7 +690,7 @@ int do_shortcut_menu(void *ignored)
{ {
char timer_buf[10]; char timer_buf[10];
set_sleeptimer_duration(sc->u.timedata.sleep_timeout); set_sleeptimer_duration(sc->u.timedata.sleep_timeout);
splashf(HZ, "%s (%s)", str(LANG_SLEEP_TIMER), splashf(HZ, "%s (%s)", str(LANG_SLEEP_TIMER),
sleep_timer_formatter(timer_buf, sizeof(timer_buf), sleep_timer_formatter(timer_buf, sizeof(timer_buf),
sc->u.timedata.sleep_timeout, NULL)); sc->u.timedata.sleep_timeout, NULL));
} }