forked from len0rd/rockbox
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
This commit is contained in:
parent
41b8ffc9d1
commit
995f64c227
1 changed files with 23 additions and 6 deletions
|
@ -32,7 +32,6 @@
|
||||||
#include "lib/grey.h"
|
#include "lib/grey.h"
|
||||||
#include "lib/feature_wrappers.h"
|
#include "lib/feature_wrappers.h"
|
||||||
#include "lib/buflib.h"
|
#include "lib/buflib.h"
|
||||||
#include "lib/playback_control.h"
|
|
||||||
|
|
||||||
PLUGIN_HEADER
|
PLUGIN_HEADER
|
||||||
|
|
||||||
|
@ -43,6 +42,10 @@ PLUGIN_HEADER
|
||||||
* within pictureflow itself, as the whole core audio buffer is occupied */
|
* within pictureflow itself, as the whole core audio buffer is occupied */
|
||||||
#define PF_PLAYBACK_CAPABLE (PLUGIN_BUFFER_SIZE > 0x10000)
|
#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 ACTION_STD_PREV
|
||||||
#define PF_PREV_REPEAT ACTION_STD_PREVREPEAT
|
#define PF_PREV_REPEAT ACTION_STD_PREVREPEAT
|
||||||
#define PF_NEXT ACTION_STD_NEXT
|
#define PF_NEXT ACTION_STD_NEXT
|
||||||
|
@ -2132,6 +2135,15 @@ int settings_menu(void)
|
||||||
/**
|
/**
|
||||||
Show the main menu
|
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 main_menu(void)
|
||||||
{
|
{
|
||||||
int selection = 0;
|
int selection = 0;
|
||||||
|
@ -2142,21 +2154,26 @@ int main_menu(void)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
MENUITEM_STRINGLIST(main_menu,"PictureFlow Main Menu",NULL,
|
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) {
|
while (1) {
|
||||||
switch (rb->do_menu(&main_menu,&selection, NULL, false)) {
|
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);
|
playback_control(NULL);
|
||||||
break;
|
break;
|
||||||
case 1:
|
#endif
|
||||||
|
case PF_MENU_SETTINGS:
|
||||||
result = settings_menu();
|
result = settings_menu();
|
||||||
if ( result != 0 ) return result;
|
if ( result != 0 ) return result;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2:
|
case PF_MENU_RETURN:
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
case 3:
|
case PF_MENU_QUIT:
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
case MENU_ATTACHED_USB:
|
case MENU_ATTACHED_USB:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue