mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-06 21:25:03 -05:00
plugins - Add PLUGIN_GOTO_ROOT - lua add PLUGIN_GOTO_ROOT and PLUGIN_ERROR
Change-Id: I018f68685877700571aa7687428cfdda436a0294
This commit is contained in:
parent
7b7d9a384a
commit
32edbd430d
5 changed files with 11 additions and 1 deletions
|
|
@ -746,6 +746,9 @@ int ft_enter(struct tree_context* c)
|
||||||
else
|
else
|
||||||
rc = GO_TO_FILEBROWSER;
|
rc = GO_TO_FILEBROWSER;
|
||||||
break;
|
break;
|
||||||
|
case PLUGIN_GOTO_ROOT:
|
||||||
|
rc = GO_TO_ROOT;
|
||||||
|
break;
|
||||||
/*
|
/*
|
||||||
case PLUGIN_ERROR:
|
case PLUGIN_ERROR:
|
||||||
case PLUGIN_OK:
|
case PLUGIN_OK:
|
||||||
|
|
|
||||||
|
|
@ -892,6 +892,8 @@ static bool onplay_load_plugin(void *param)
|
||||||
onplay_result = ONPLAY_PLUGIN;
|
onplay_result = ONPLAY_PLUGIN;
|
||||||
else if (ret == PLUGIN_GOTO_WPS)
|
else if (ret == PLUGIN_GOTO_WPS)
|
||||||
onplay_result = ONPLAY_START_PLAY;
|
onplay_result = ONPLAY_START_PLAY;
|
||||||
|
else if (ret == PLUGIN_GOTO_ROOT)
|
||||||
|
onplay_result = ONPLAY_MAINMENU;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -191,6 +191,7 @@ enum plugin_status {
|
||||||
PLUGIN_POWEROFF,
|
PLUGIN_POWEROFF,
|
||||||
PLUGIN_GOTO_WPS,
|
PLUGIN_GOTO_WPS,
|
||||||
PLUGIN_GOTO_PLUGIN,
|
PLUGIN_GOTO_PLUGIN,
|
||||||
|
PLUGIN_GOTO_ROOT,
|
||||||
PLUGIN_ERROR = -1,
|
PLUGIN_ERROR = -1,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ if ($def_type eq "rb_defines") {
|
||||||
'^SYS_(TIMEOUT|POWEROFF|BATTERY_UPDATE)$',
|
'^SYS_(TIMEOUT|POWEROFF|BATTERY_UPDATE)$',
|
||||||
'^SYS_USB_(DIS|)CONNECTED$',
|
'^SYS_USB_(DIS|)CONNECTED$',
|
||||||
'^HOME_DIR$',
|
'^HOME_DIR$',
|
||||||
'^PLUGIN(_OK|_USB_CONNECTED|_POWEROFF|_GOTO_WPS|_GOTO_PLUGIN)$',
|
'^PLUGIN(_OK|_USB_CONNECTED|_POWEROFF|_GOTO_WPS|_GOTO_PLUGIN|_GOTO_ROOT|_ERROR)$',
|
||||||
'^PLUGIN_DIR$',
|
'^PLUGIN_DIR$',
|
||||||
'^PLUGIN(_APPS_|_GAMES_|_)DATA_DIR$',
|
'^PLUGIN(_APPS_|_GAMES_|_)DATA_DIR$',
|
||||||
'^ROCKBOX_DIR$',
|
'^ROCKBOX_DIR$',
|
||||||
|
|
|
||||||
|
|
@ -808,6 +808,10 @@ static int load_plugin_screen(char *key)
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
else if (ret == PLUGIN_GOTO_ROOT)
|
||||||
|
{
|
||||||
|
ret_val = GO_TO_ROOT;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ret_val = GO_TO_PREVIOUS;
|
ret_val = GO_TO_PREVIOUS;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue