diff options
author | William Wilgus <wilgus.william@gmail.com> | 2021-11-07 01:56:49 -0400 |
---|---|---|
committer | William Wilgus <wilgus.william@gmail.com> | 2021-11-07 01:49:15 -0500 |
commit | 1d67f83c587cce30a9afa10f966cc04a86adb87b (patch) | |
tree | 8e8b1e7255c798405d8ad15d8d7e575c6bcc439e /apps/open_plugin.c | |
parent | 13ac48562544eada909ee39a63d5b87afe51b219 (diff) | |
download | rockbox-1d67f83c587cce30a9afa10f966cc04a86adb87b.tar.gz rockbox-1d67f83c587cce30a9afa10f966cc04a86adb87b.zip |
root_menu.c fix recent regression for shortcuts add resume for plugins
recent changes broke shortcuts when they originated from the root menu
I mistakenly thought GO_TO_ROOT only happened at start and otherwise was
GO_TO_PREVIOUS
this commit also adds a few missing features for Start In Previous
to resume the last plugin running at shutdown
Additionally GO_TO_ROOT now overwrites the global last_screen so you can
return to the main menu on next startup
Change-Id: I86bf842616e25dc3d4f684ff9d476e6a5ba96b04
Diffstat (limited to 'apps/open_plugin.c')
-rw-r--r-- | apps/open_plugin.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/apps/open_plugin.c b/apps/open_plugin.c index d16502ecbe..f7f55d58cd 100644 --- a/apps/open_plugin.c +++ b/apps/open_plugin.c | |||
@@ -374,6 +374,15 @@ int open_plugin_run(const char *key) | |||
374 | void open_plugin_cache_flush(void) | 374 | void open_plugin_cache_flush(void) |
375 | { | 375 | { |
376 | logf("OP *cache flush*"); | 376 | logf("OP *cache flush*"); |
377 | /* start_in_screen == 0 is 'Previous Screen' it is actually | ||
378 | * defined as (GO_TO_PREVIOUS = -2) + 2 for *Legacy?* reasons AFAICT */ | ||
379 | if (global_settings.start_in_screen == 0 && | ||
380 | global_status.last_screen == GO_TO_PLUGIN && | ||
381 | open_plugin_entry.lang_id > OPEN_PLUGIN_LANG_INVALID) | ||
382 | { | ||
383 | /* flush the last item as LANG_PREVIOUS_SCREEN if the user wants to resume */ | ||
384 | open_plugin_entry.lang_id = LANG_PREVIOUS_SCREEN; | ||
385 | } | ||
377 | op_update_dat(&open_plugin_entry, true); | 386 | op_update_dat(&open_plugin_entry, true); |
378 | } | 387 | } |
379 | 388 | ||