Refactor/rename menu_action.c functions

This commit is contained in:
twinaphex 2014-09-12 06:04:02 +02:00
parent 050a6b9571
commit f5e523a8c3
5 changed files with 13 additions and 13 deletions

View File

@ -280,11 +280,11 @@ static void handle_setting(rarch_setting_t *setting,
unsigned id, const char *label, unsigned action) unsigned id, const char *label, unsigned action)
{ {
if (setting->type == ST_BOOL) if (setting->type == ST_BOOL)
menu_common_setting_set_current_boolean(setting, action); menu_action_setting_boolean(setting, action);
else if (setting->type == ST_UINT) else if (setting->type == ST_UINT)
menu_common_setting_set_current_unsigned_integer(setting, id, action); menu_action_setting_unsigned_integer(setting, id, action);
else if (setting->type == ST_FLOAT) else if (setting->type == ST_FLOAT)
menu_common_setting_set_current_fraction(setting, action); menu_action_setting_fraction(setting, action);
else if (setting->type == ST_DIR) else if (setting->type == ST_DIR)
{ {
if (action == MENU_ACTION_START) if (action == MENU_ACTION_START)

View File

@ -329,7 +329,7 @@ static int menu_common_shader_manager_setting_toggle(
{ {
if ((current_setting = setting_data_find_setting( if ((current_setting = setting_data_find_setting(
setting_data, "video_smooth"))) setting_data, "video_smooth")))
menu_common_setting_set_current_boolean(current_setting, action); menu_action_setting_boolean(current_setting, action);
} }
else if (id >= MENU_SETTINGS_SHADER_PARAMETER_0 else if (id >= MENU_SETTINGS_SHADER_PARAMETER_0
&& id <= MENU_SETTINGS_SHADER_PARAMETER_LAST) && id <= MENU_SETTINGS_SHADER_PARAMETER_LAST)

View File

@ -304,13 +304,13 @@ static int menu_lakka_iterate(unsigned action)
case MENU_ACTION_OK: case MENU_ACTION_OK:
case MENU_ACTION_START: case MENU_ACTION_START:
if (active_subitem->setting->type == ST_BOOL) if (active_subitem->setting->type == ST_BOOL)
menu_common_setting_set_current_boolean( menu_action_setting_boolean(
active_subitem->setting, action); active_subitem->setting, action);
else if (active_subitem->setting->type == ST_UINT) else if (active_subitem->setting->type == ST_UINT)
menu_common_setting_set_current_unsigned_integer( menu_action_setting_unsigned_integer(
active_subitem->setting, 0, action); active_subitem->setting, 0, action);
else if (active_subitem->setting->type == ST_FLOAT) else if (active_subitem->setting->type == ST_FLOAT)
menu_common_setting_set_current_fraction( menu_action_setting_fraction(
active_subitem->setting, action); active_subitem->setting, action);
break; break;
default: default:

View File

@ -18,7 +18,7 @@
#include "menu_input_line_cb.h" #include "menu_input_line_cb.h"
#include "menu_action.h" #include "menu_action.h"
void menu_common_setting_set_current_boolean( void menu_action_setting_boolean(
rarch_setting_t *setting, unsigned action) rarch_setting_t *setting, unsigned action)
{ {
if ( if (
@ -57,7 +57,7 @@ void menu_common_setting_set_current_boolean(
setting->change_handler(setting); setting->change_handler(setting);
} }
void menu_common_setting_set_current_unsigned_integer( void menu_action_setting_unsigned_integer(
rarch_setting_t *setting, unsigned id, unsigned action) rarch_setting_t *setting, unsigned id, unsigned action)
{ {
if (id == MENU_FILE_LINEFEED) if (id == MENU_FILE_LINEFEED)
@ -108,7 +108,7 @@ void menu_common_setting_set_current_unsigned_integer(
setting->change_handler(setting); setting->change_handler(setting);
} }
void menu_common_setting_set_current_fraction( void menu_action_setting_fraction(
rarch_setting_t *setting, unsigned action) rarch_setting_t *setting, unsigned action)
{ {
if (!strcmp(setting->name, "video_refresh_rate_auto")) if (!strcmp(setting->name, "video_refresh_rate_auto"))

View File

@ -19,13 +19,13 @@
#include "../../settings_data.h" #include "../../settings_data.h"
void menu_common_setting_set_current_boolean( void menu_action_setting_boolean(
rarch_setting_t *setting, unsigned action); rarch_setting_t *setting, unsigned action);
void menu_common_setting_set_current_fraction( void menu_action_setting_fraction(
rarch_setting_t *setting, unsigned action); rarch_setting_t *setting, unsigned action);
void menu_common_setting_set_current_unsigned_integer( void menu_action_setting_unsigned_integer(
rarch_setting_t *setting, unsigned id, unsigned action); rarch_setting_t *setting, unsigned id, unsigned action);
#endif #endif