diff options
author | Christian Soffke <christian.soffke@gmail.com> | 2024-05-13 21:26:30 +0200 |
---|---|---|
committer | Christian Soffke <christian.soffke@gmail.com> | 2024-05-13 21:26:30 +0200 |
commit | 556b466f05ac373b45bcf60e55f8c0acb64411d2 (patch) | |
tree | 87aa4f527f2481c14f14a4d5b37b3e301a91dc3f | |
parent | b94e5d77fe6a5a87b0e93982ba593a9e3853101a (diff) | |
download | rockbox-556b466f05.tar.gz rockbox-556b466f05.zip |
shortcuts: allow empty name for sleep shortcuts with default duration
missed this in f631bfe
Change-Id: Ifdb3ffc04b49133b770850b98399605c04742f6e
-rw-r--r-- | apps/shortcuts.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/apps/shortcuts.c b/apps/shortcuts.c index a7fbe7ccec..5453422b43 100644 --- a/apps/shortcuts.c +++ b/apps/shortcuts.c @@ -186,7 +186,11 @@ static bool verify_shortcut(struct shortcut* sc) case SHORTCUT_SETTING: return sc->u.setting != NULL; case SHORTCUT_TIME: - return sc->name[0] != '\0'; +#if CONFIG_RTC + if (sc->u.timedata.talktime) + return sc->name[0] != '\0'; +#endif + return sc->name[0] != '\0' || sc->u.timedata.sleep_timeout < 0; case SHORTCUT_DEBUGITEM: case SHORTCUT_SEPARATOR: case SHORTCUT_SHUTDOWN: |