summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorChristian Soffke <christian.soffke@gmail.com>2024-05-13 21:26:30 +0200
committerChristian Soffke <christian.soffke@gmail.com>2024-05-13 21:26:30 +0200
commit556b466f05ac373b45bcf60e55f8c0acb64411d2 (patch)
tree87aa4f527f2481c14f14a4d5b37b3e301a91dc3f /apps
parentb94e5d77fe6a5a87b0e93982ba593a9e3853101a (diff)
downloadrockbox-556b466f05ac373b45bcf60e55f8c0acb64411d2.tar.gz
rockbox-556b466f05ac373b45bcf60e55f8c0acb64411d2.zip
shortcuts: allow empty name for sleep shortcuts with default duration
missed this in f631bfe Change-Id: Ifdb3ffc04b49133b770850b98399605c04742f6e
Diffstat (limited to 'apps')
-rw-r--r--apps/shortcuts.c6
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)
186 case SHORTCUT_SETTING: 186 case SHORTCUT_SETTING:
187 return sc->u.setting != NULL; 187 return sc->u.setting != NULL;
188 case SHORTCUT_TIME: 188 case SHORTCUT_TIME:
189 return sc->name[0] != '\0'; 189#if CONFIG_RTC
190 if (sc->u.timedata.talktime)
191 return sc->name[0] != '\0';
192#endif
193 return sc->name[0] != '\0' || sc->u.timedata.sleep_timeout < 0;
190 case SHORTCUT_DEBUGITEM: 194 case SHORTCUT_DEBUGITEM:
191 case SHORTCUT_SEPARATOR: 195 case SHORTCUT_SEPARATOR:
192 case SHORTCUT_SHUTDOWN: 196 case SHORTCUT_SHUTDOWN: