mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-14 14:28:47 +00:00
Cleanup menu_action.c
This commit is contained in:
parent
97f26dfae1
commit
be4c043735
@ -20,7 +20,7 @@
|
||||
#include "menu_entries.h"
|
||||
#include "menu_shader.h"
|
||||
|
||||
static int setting_handler(
|
||||
int setting_handler(
|
||||
rarch_setting_t *setting, unsigned action)
|
||||
{
|
||||
switch (action)
|
||||
@ -53,24 +53,6 @@ static int setting_handler(
|
||||
return 0;
|
||||
}
|
||||
|
||||
int menu_action_setting_boolean(
|
||||
rarch_setting_t *setting, unsigned action)
|
||||
{
|
||||
return setting_handler(setting, action);
|
||||
}
|
||||
|
||||
int menu_action_setting_unsigned_integer(
|
||||
rarch_setting_t *setting, unsigned action)
|
||||
{
|
||||
return setting_handler(setting, action);
|
||||
}
|
||||
|
||||
int menu_action_setting_fraction(
|
||||
rarch_setting_t *setting, unsigned action)
|
||||
{
|
||||
return setting_handler(setting, action);
|
||||
}
|
||||
|
||||
int menu_action_setting_set_current_string(
|
||||
rarch_setting_t *setting, const char *str)
|
||||
{
|
||||
@ -155,18 +137,16 @@ int menu_action_handle_setting(rarch_setting_t *setting,
|
||||
if (!setting)
|
||||
return -1;
|
||||
|
||||
if (setting->type == ST_BOOL)
|
||||
return menu_action_setting_boolean(setting, action);
|
||||
if (setting->type == ST_UINT)
|
||||
return menu_action_setting_unsigned_integer(setting, action);
|
||||
if (setting->type == ST_FLOAT)
|
||||
return menu_action_setting_fraction(setting, action);
|
||||
if (setting->type == ST_PATH)
|
||||
switch (setting->type)
|
||||
{
|
||||
case ST_BOOL:
|
||||
case ST_UINT:
|
||||
case ST_FLOAT:
|
||||
return setting_handler(setting, action);
|
||||
case ST_PATH:
|
||||
return menu_entries_set_current_path_selection(setting,
|
||||
setting->default_value.string, setting->name, type, action);
|
||||
|
||||
if (setting->type == ST_DIR)
|
||||
{
|
||||
case ST_DIR:
|
||||
switch (action)
|
||||
{
|
||||
case MENU_ACTION_START:
|
||||
@ -183,12 +163,8 @@ int menu_action_handle_setting(rarch_setting_t *setting,
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (setting->type == ST_STRING)
|
||||
{
|
||||
break;
|
||||
case ST_STRING:
|
||||
switch (action)
|
||||
{
|
||||
case MENU_ACTION_LEFT:
|
||||
@ -205,8 +181,9 @@ int menu_action_handle_setting(rarch_setting_t *setting,
|
||||
return setting->action_ok(setting, action);
|
||||
break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -23,13 +23,7 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
int menu_action_setting_boolean(
|
||||
rarch_setting_t *setting, unsigned action);
|
||||
|
||||
int menu_action_setting_fraction(
|
||||
rarch_setting_t *setting, unsigned action);
|
||||
|
||||
int menu_action_setting_unsigned_integer(
|
||||
int setting_handler(
|
||||
rarch_setting_t *setting, unsigned action);
|
||||
|
||||
int menu_action_set_current_string_based_on_label(
|
||||
|
@ -917,7 +917,7 @@ static int action_toggle_shader_filter_default(unsigned type, const char *label,
|
||||
rarch_setting_t *current_setting = NULL;
|
||||
if ((current_setting = setting_data_find_setting(
|
||||
driver.menu->list_settings, "video_smooth")))
|
||||
menu_action_setting_boolean(current_setting, action);
|
||||
setting_handler(current_setting, action);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user