diff options
author | Thomas Martitz <kugel@rockbox.org> | 2009-06-08 16:39:24 +0000 |
---|---|---|
committer | Thomas Martitz <kugel@rockbox.org> | 2009-06-08 16:39:24 +0000 |
commit | 995f64c22739d5fb7806315edfa5c61bd451da8e (patch) | |
tree | 227c35a1f79f84ae73dadc827fe6d44a91caad4e | |
parent | 41b8ffc9d1138e76c9720af52202fbc7da56701f (diff) |
Pictureflow: Don't show the playback control one targets that can't have playback in pictureflow.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21216 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | apps/plugins/pictureflow/pictureflow.c | 29 |
1 files changed, 23 insertions, 6 deletions
diff --git a/apps/plugins/pictureflow/pictureflow.c b/apps/plugins/pictureflow/pictureflow.c index bec3bde040..ada47bca5e 100644 --- a/apps/plugins/pictureflow/pictureflow.c +++ b/apps/plugins/pictureflow/pictureflow.c @@ -32,7 +32,6 @@ #include "lib/grey.h" #include "lib/feature_wrappers.h" #include "lib/buflib.h" -#include "lib/playback_control.h" PLUGIN_HEADER @@ -43,6 +42,10 @@ PLUGIN_HEADER * within pictureflow itself, as the whole core audio buffer is occupied */ #define PF_PLAYBACK_CAPABLE (PLUGIN_BUFFER_SIZE > 0x10000) +#if PF_PLAYBACK_CAPABLE +#include "lib/playback_control.h" +#endif + #define PF_PREV ACTION_STD_PREV #define PF_PREV_REPEAT ACTION_STD_PREVREPEAT #define PF_NEXT ACTION_STD_NEXT @@ -2132,6 +2135,15 @@ int settings_menu(void) /** Show the main menu */ +enum { +#if PF_PLAYBACK_CAPABLE + PF_MENU_PLAYBACK_CONTROl, +#endif + PF_MENU_SETTINGS, + PF_MENU_RETURN, + PF_MENU_QUIT, +}; + int main_menu(void) { int selection = 0; @@ -2142,21 +2154,26 @@ int main_menu(void) #endif MENUITEM_STRINGLIST(main_menu,"PictureFlow Main Menu",NULL, - "Playback Control", "Settings", "Return", "Quit"); +#if PF_PLAYBACK_CAPABLE + "Playback Control", +#endif + "Settings", "Return", "Quit"); while (1) { switch (rb->do_menu(&main_menu,&selection, NULL, false)) { - case 0: /* Playback Control */ +#if PF_PLAYBACK_CAPABLE + case PF_MENU_PLAYBACK_CONTROl: /* Playback Control */ playback_control(NULL); break; - case 1: +#endif + case PF_MENU_SETTINGS: result = settings_menu(); if ( result != 0 ) return result; break; - case 2: + case PF_MENU_RETURN: return 0; - case 3: + case PF_MENU_QUIT: return -1; case MENU_ATTACHED_USB: |