diff options
author | William Wilgus <wilgus.william@gmail.com> | 2020-07-31 22:45:10 -0400 |
---|---|---|
committer | William Wilgus <wilgus.william@gmail.com> | 2020-08-17 10:15:14 -0400 |
commit | 35502834423049b319fde41ff305b48de67d2d51 (patch) | |
tree | 00d638d9348cd38f15cf6d341e700bc36153b3f8 /apps/plugins/pictureflow | |
parent | d553bb1149800daf16dcb92bc0608fe6248e1dab (diff) | |
download | rockbox-35502834423049b319fde41ff305b48de67d2d51.tar.gz rockbox-35502834423049b319fde41ff305b48de67d2d51.zip |
Add open_plugin to core
open_plugin allows arbitrary plugins to be called
in hotkey and start screen
replaces PictureFlow Integration
shortcuts menu plays plugins now too
rather than store paths and parameters in the settings
that reside in memory instead entries in a file are searched by hash.
after all, the plugin has to be loaded from disk anyways
----------------------------------------------------------------------------
shortcut_viewer.rock-- can now call plugins rather than taking you to them
in the browser
-----------------------------------------------------------------------------
Added a new option to menus:
F_CB_ON_SELECT_ONLY
instead of option callback every time a item is accessed
F_CB_ON_SELECT_ONLY fires callback only when item is selected
-----------------------------------------------------------------------------
Added manual entries
-----------------------------------------------------------------------------
Change-Id: I078b57b1d2b4dd633c89212c1082fcbc1b516e6a
Diffstat (limited to 'apps/plugins/pictureflow')
-rw-r--r-- | apps/plugins/pictureflow/pictureflow.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/apps/plugins/pictureflow/pictureflow.c b/apps/plugins/pictureflow/pictureflow.c index d1da10ee09..91062f8f11 100644 --- a/apps/plugins/pictureflow/pictureflow.c +++ b/apps/plugins/pictureflow/pictureflow.c | |||
@@ -533,19 +533,28 @@ static void free_all_slide_prio(int prio); | |||
533 | static bool check_database(bool prompt) | 533 | static bool check_database(bool prompt) |
534 | { | 534 | { |
535 | bool needwarn = true; | 535 | bool needwarn = true; |
536 | int spin = 5; | ||
537 | |||
536 | struct tagcache_stat *stat = rb->tagcache_get_stat(); | 538 | struct tagcache_stat *stat = rb->tagcache_get_stat(); |
539 | |||
537 | while ( !(stat->initialized && stat->ready) ) | 540 | while ( !(stat->initialized && stat->ready) ) |
538 | { | 541 | { |
539 | if (needwarn) | 542 | if (--spin > 0) |
543 | { | ||
544 | rb->sleep(HZ/5); | ||
545 | } | ||
546 | else if (needwarn) | ||
547 | { | ||
548 | needwarn = false; | ||
540 | rb->splash(0, ID2P(LANG_TAGCACHE_BUSY)); | 549 | rb->splash(0, ID2P(LANG_TAGCACHE_BUSY)); |
541 | if (!prompt) | 550 | } |
551 | else if (!prompt) | ||
542 | return false; | 552 | return false; |
543 | else if (rb->action_userabort(HZ/5)) | 553 | else if (rb->action_userabort(HZ/5)) |
544 | return false; | 554 | return false; |
545 | 555 | ||
546 | needwarn = false; | ||
547 | stat = rb->tagcache_get_stat(); | ||
548 | rb->yield(); | 556 | rb->yield(); |
557 | stat = rb->tagcache_get_stat(); | ||
549 | } | 558 | } |
550 | return true; | 559 | return true; |
551 | } | 560 | } |
@@ -3841,7 +3850,7 @@ enum plugin_status plugin_start(const void *parameter) | |||
3841 | 3850 | ||
3842 | void * buf; | 3851 | void * buf; |
3843 | size_t buf_size; | 3852 | size_t buf_size; |
3844 | bool prompt = (parameter && ((char *) parameter)[0] == ACTIVITY_MAINMENU); | 3853 | bool prompt = (parameter && (((char *) parameter)[0] == ACTIVITY_MAINMENU)); |
3845 | 3854 | ||
3846 | if (!check_database(prompt)) | 3855 | if (!check_database(prompt)) |
3847 | { | 3856 | { |