mirror of
https://github.com/libretro/RetroArch
synced 2025-01-30 12:32:52 +00:00
Cleanups
This commit is contained in:
parent
aa4cc4f4a2
commit
5eed703d64
@ -371,7 +371,7 @@ static int menu_lakka_iterate(unsigned action)
|
|||||||
if (setting->type == ST_BOOL)
|
if (setting->type == ST_BOOL)
|
||||||
menu_action_setting_boolean(setting, action);
|
menu_action_setting_boolean(setting, action);
|
||||||
else if (setting->type == ST_UINT)
|
else if (setting->type == ST_UINT)
|
||||||
menu_action_setting_unsigned_integer(setting, 0, action);
|
menu_action_setting_unsigned_integer(setting, action);
|
||||||
else if (setting->type == ST_FLOAT)
|
else if (setting->type == ST_FLOAT)
|
||||||
menu_action_setting_fraction(setting, action);
|
menu_action_setting_fraction(setting, action);
|
||||||
else if (setting->type == ST_STRING)
|
else if (setting->type == ST_STRING)
|
||||||
|
@ -46,7 +46,7 @@ int menu_action_setting_boolean(
|
|||||||
}
|
}
|
||||||
|
|
||||||
int menu_action_setting_unsigned_integer(
|
int menu_action_setting_unsigned_integer(
|
||||||
rarch_setting_t *setting, unsigned type, unsigned action)
|
rarch_setting_t *setting, unsigned action)
|
||||||
{
|
{
|
||||||
if (setting->action_ok)
|
if (setting->action_ok)
|
||||||
setting->action_ok(setting, action);
|
setting->action_ok(setting, action);
|
||||||
@ -145,12 +145,15 @@ static int menu_entries_set_current_path_selection(
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int menu_action_handle_setting(rarch_setting_t *setting,
|
static int menu_action_handle_setting(rarch_setting_t *setting,
|
||||||
unsigned type, const char *label, unsigned action)
|
unsigned type, unsigned action)
|
||||||
{
|
{
|
||||||
|
if (!setting)
|
||||||
|
return -1;
|
||||||
|
|
||||||
if (setting->type == ST_BOOL)
|
if (setting->type == ST_BOOL)
|
||||||
return menu_action_setting_boolean(setting, action);
|
return menu_action_setting_boolean(setting, action);
|
||||||
if (setting->type == ST_UINT)
|
if (setting->type == ST_UINT)
|
||||||
return menu_action_setting_unsigned_integer(setting, type, action);
|
return menu_action_setting_unsigned_integer(setting, action);
|
||||||
if (setting->type == ST_FLOAT)
|
if (setting->type == ST_FLOAT)
|
||||||
return menu_action_setting_fraction(setting, action);
|
return menu_action_setting_fraction(setting, action);
|
||||||
if (setting->type == ST_PATH)
|
if (setting->type == ST_PATH)
|
||||||
@ -291,7 +294,7 @@ int menu_action_setting_set(unsigned type, const char *label,
|
|||||||
driver.menu->list_settings, list->list[driver.menu->selection_ptr].label);
|
driver.menu->list_settings, list->list[driver.menu->selection_ptr].label);
|
||||||
|
|
||||||
if (setting)
|
if (setting)
|
||||||
return menu_action_handle_setting(setting, type, label, action);
|
return menu_action_handle_setting(setting, type, action);
|
||||||
|
|
||||||
/* Check if setting belongs to main menu. */
|
/* Check if setting belongs to main menu. */
|
||||||
|
|
||||||
@ -299,7 +302,7 @@ int menu_action_setting_set(unsigned type, const char *label,
|
|||||||
driver.menu->list_mainmenu, list->list[driver.menu->selection_ptr].label);
|
driver.menu->list_mainmenu, list->list[driver.menu->selection_ptr].label);
|
||||||
|
|
||||||
if (setting)
|
if (setting)
|
||||||
return menu_action_handle_setting(setting, type, label, action);
|
return menu_action_handle_setting(setting, type, action);
|
||||||
|
|
||||||
/* Fallback. */
|
/* Fallback. */
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@ int menu_action_setting_fraction(
|
|||||||
rarch_setting_t *setting, unsigned action);
|
rarch_setting_t *setting, unsigned action);
|
||||||
|
|
||||||
int menu_action_setting_unsigned_integer(
|
int menu_action_setting_unsigned_integer(
|
||||||
rarch_setting_t *setting, unsigned type, unsigned action);
|
rarch_setting_t *setting, unsigned action);
|
||||||
|
|
||||||
void menu_action_setting_driver(
|
void menu_action_setting_driver(
|
||||||
rarch_setting_t *setting, unsigned action);
|
rarch_setting_t *setting, unsigned action);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user