(Menu) Cleanups

This commit is contained in:
twinaphex 2015-06-15 16:56:59 +02:00
parent 6f71440c98
commit 84e2a6d983
5 changed files with 6 additions and 5 deletions

View File

@ -21,9 +21,8 @@ static int action_bind_down_generic(unsigned type, const char *label)
{
unsigned scroll_speed = 0;
menu_navigation_t *nav = menu_navigation_get_ptr();
menu_handle_t *menu = menu_driver_get_ptr();
menu_list_t *menu_list = menu_list_get_ptr();
if (!menu || !menu_list || !nav)
if (!menu_list || !nav)
return -1;
scroll_speed = (max(nav->scroll.acceleration, 2) - 2) / 4 + 1;

View File

@ -642,7 +642,7 @@ static int action_ok_record_configfile_load(const char *path,
fill_pathname_join(global->record.config, menu_path, path, sizeof(global->record.config));
menu_list_flush_stack(menu_list, "Recording Settings", 0);
menu_list_flush_stack(menu_list, menu_hash_to_str(MENU_VALUE_RECORDING_SETTINGS), 0);
return 0;
}

View File

@ -20,9 +20,8 @@ static int action_bind_up_generic(unsigned type, const char *label)
{
unsigned scroll_speed = 0;
menu_navigation_t *nav = menu_navigation_get_ptr();
menu_handle_t *menu = menu_driver_get_ptr();
menu_list_t *menu_list = menu_list_get_ptr();
if (!menu || !menu_list)
if (!menu_list)
return -1;
scroll_speed = (max(nav->scroll.acceleration, 2) - 2) / 4 + 1;

View File

@ -22,6 +22,8 @@ const char *menu_hash_to_str(uint32_t hash)
{
switch (hash)
{
case MENU_VALUE_RECORDING_SETTINGS:
return "Recording Settings";
case MENU_VALUE_MAIN_MENU:
return "Main Menu";
case MENU_VALUE_SETTINGS:

View File

@ -179,6 +179,7 @@ extern "C" {
#define MENU_VALUE_HORIZONTAL_MENU 0x35761704U
#define MENU_VALUE_MAIN_MENU 0x1625971fU
#define MENU_VALUE_SETTINGS 0x8aca3ff6U
#define MENU_VALUE_RECORDING_SETTINGS 0x1a80b313U
#define MENU_VALUE_INPUT_SETTINGS 0xddd30846U
#define MENU_VALUE_ON 0x005974c2U
#define MENU_VALUE_OFF 0x0b880c40U