summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2009-06-08 16:39:24 +0000
committerThomas Martitz <kugel@rockbox.org>2009-06-08 16:39:24 +0000
commit995f64c22739d5fb7806315edfa5c61bd451da8e (patch)
tree227c35a1f79f84ae73dadc827fe6d44a91caad4e
parent41b8ffc9d1138e76c9720af52202fbc7da56701f (diff)
downloadrockbox-995f64c22739d5fb7806315edfa5c61bd451da8e.tar.gz
rockbox-995f64c22739d5fb7806315edfa5c61bd451da8e.zip
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.c29
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 @@
32#include "lib/grey.h" 32#include "lib/grey.h"
33#include "lib/feature_wrappers.h" 33#include "lib/feature_wrappers.h"
34#include "lib/buflib.h" 34#include "lib/buflib.h"
35#include "lib/playback_control.h"
36 35
37PLUGIN_HEADER 36PLUGIN_HEADER
38 37
@@ -43,6 +42,10 @@ PLUGIN_HEADER
43 * within pictureflow itself, as the whole core audio buffer is occupied */ 42 * within pictureflow itself, as the whole core audio buffer is occupied */
44#define PF_PLAYBACK_CAPABLE (PLUGIN_BUFFER_SIZE > 0x10000) 43#define PF_PLAYBACK_CAPABLE (PLUGIN_BUFFER_SIZE > 0x10000)
45 44
45#if PF_PLAYBACK_CAPABLE
46#include "lib/playback_control.h"
47#endif
48
46#define PF_PREV ACTION_STD_PREV 49#define PF_PREV ACTION_STD_PREV
47#define PF_PREV_REPEAT ACTION_STD_PREVREPEAT 50#define PF_PREV_REPEAT ACTION_STD_PREVREPEAT
48#define PF_NEXT ACTION_STD_NEXT 51#define PF_NEXT ACTION_STD_NEXT
@@ -2132,6 +2135,15 @@ int settings_menu(void)
2132/** 2135/**
2133 Show the main menu 2136 Show the main menu
2134 */ 2137 */
2138enum {
2139#if PF_PLAYBACK_CAPABLE
2140 PF_MENU_PLAYBACK_CONTROl,
2141#endif
2142 PF_MENU_SETTINGS,
2143 PF_MENU_RETURN,
2144 PF_MENU_QUIT,
2145};
2146
2135int main_menu(void) 2147int main_menu(void)
2136{ 2148{
2137 int selection = 0; 2149 int selection = 0;
@@ -2142,21 +2154,26 @@ int main_menu(void)
2142#endif 2154#endif
2143 2155
2144 MENUITEM_STRINGLIST(main_menu,"PictureFlow Main Menu",NULL, 2156 MENUITEM_STRINGLIST(main_menu,"PictureFlow Main Menu",NULL,
2145 "Playback Control", "Settings", "Return", "Quit"); 2157#if PF_PLAYBACK_CAPABLE
2158 "Playback Control",
2159#endif
2160 "Settings", "Return", "Quit");
2146 while (1) { 2161 while (1) {
2147 switch (rb->do_menu(&main_menu,&selection, NULL, false)) { 2162 switch (rb->do_menu(&main_menu,&selection, NULL, false)) {
2148 case 0: /* Playback Control */ 2163#if PF_PLAYBACK_CAPABLE
2164 case PF_MENU_PLAYBACK_CONTROl: /* Playback Control */
2149 playback_control(NULL); 2165 playback_control(NULL);
2150 break; 2166 break;
2151 case 1: 2167#endif
2168 case PF_MENU_SETTINGS:
2152 result = settings_menu(); 2169 result = settings_menu();
2153 if ( result != 0 ) return result; 2170 if ( result != 0 ) return result;
2154 break; 2171 break;
2155 2172
2156 case 2: 2173 case PF_MENU_RETURN:
2157 return 0; 2174 return 0;
2158 2175
2159 case 3: 2176 case PF_MENU_QUIT:
2160 return -1; 2177 return -1;
2161 2178
2162 case MENU_ATTACHED_USB: 2179 case MENU_ATTACHED_USB: