diff options
Diffstat (limited to 'apps')
-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 @@ | |||
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 | ||
37 | PLUGIN_HEADER | 36 | PLUGIN_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 | */ |
2138 | enum { | ||
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 | |||
2135 | int main_menu(void) | 2147 | int 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: |