mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-24 08:30:16 +00:00
Rename menu_action.c to menu_setting.c
This commit is contained in:
parent
7d32b27024
commit
94e1a339df
@ -304,7 +304,7 @@ ifeq ($(HAVE_MENU_COMMON), 1)
|
||||
menu/menu.o \
|
||||
menu/menu_common_list.o \
|
||||
menu/menu_navigation.o \
|
||||
menu/menu_action.o \
|
||||
menu/menu_setting.o \
|
||||
menu/menu_database.o \
|
||||
menu/menu_shader.o \
|
||||
menu/menu_texture.o \
|
||||
|
@ -681,7 +681,7 @@ MENU
|
||||
#include "../menu/menu_input.c"
|
||||
#include "../menu/menu.c"
|
||||
#include "../menu/menu_common_list.c"
|
||||
#include "../menu/menu_action.c"
|
||||
#include "../menu/menu_setting.c"
|
||||
#include "../menu/menu_list.c"
|
||||
#include "../menu/menu_entries.c"
|
||||
#include "../menu/menu_entries_cbs.c"
|
||||
|
@ -15,7 +15,7 @@
|
||||
*/
|
||||
|
||||
#include "menu_entries.h"
|
||||
#include "menu_action.h"
|
||||
#include "menu_setting.h"
|
||||
#include "menu_navigation.h"
|
||||
#include <file/file_list.h>
|
||||
#include <file/file_path.h>
|
||||
@ -91,7 +91,7 @@ int menu_entries_push_list(menu_handle_t *menu,
|
||||
settings_list_free(menu->list_settings);
|
||||
menu->list_settings = (rarch_setting_t *)setting_data_new(setting_flags);
|
||||
|
||||
if (!(setting = (rarch_setting_t*)menu_action_find_setting(label)))
|
||||
if (!(setting = (rarch_setting_t*)menu_setting_find(label)))
|
||||
return -1;
|
||||
|
||||
menu_list_clear(list);
|
||||
|
@ -16,7 +16,7 @@
|
||||
#include <file/file_path.h>
|
||||
#include "menu.h"
|
||||
#include "menu_entries_cbs.h"
|
||||
#include "menu_action.h"
|
||||
#include "menu_setting.h"
|
||||
#include "menu_input.h"
|
||||
#include "menu_entries.h"
|
||||
#include "menu_shader.h"
|
||||
@ -264,7 +264,7 @@ int menu_action_setting_set_current_string(
|
||||
rarch_setting_t *setting, const char *str)
|
||||
{
|
||||
strlcpy(setting->value.string, str, setting->size);
|
||||
return menu_action_generic_setting(setting);
|
||||
return menu_setting_generic(setting);
|
||||
}
|
||||
|
||||
static int action_ok_rdb_playlist_entry(const char *path,
|
||||
@ -594,7 +594,7 @@ static int action_ok_menu_wallpaper_load(const char *path,
|
||||
menu_list_get_last_stack(menu->menu_list, &menu_path, &menu_label,
|
||||
NULL);
|
||||
|
||||
setting = menu_action_find_setting(menu_label);
|
||||
setting = menu_setting_find(menu_label);
|
||||
|
||||
if (!setting)
|
||||
return -1;
|
||||
@ -686,7 +686,7 @@ static int action_ok_path_use_directory(const char *path,
|
||||
menu_list_get_last_stack(menu->menu_list,
|
||||
&menu_path, &menu_label, NULL);
|
||||
|
||||
setting = menu_action_find_setting(menu_label);
|
||||
setting = menu_setting_find(menu_label);
|
||||
|
||||
if (!setting)
|
||||
return -1;
|
||||
@ -1478,7 +1478,7 @@ static int menu_action_setting_set_current_string_path(
|
||||
rarch_setting_t *setting, const char *dir, const char *path)
|
||||
{
|
||||
fill_pathname_join(setting->value.string, dir, path, setting->size);
|
||||
return menu_action_generic_setting(setting);
|
||||
return menu_setting_generic(setting);
|
||||
}
|
||||
|
||||
static int action_ok_file_load(const char *path,
|
||||
@ -1495,7 +1495,7 @@ static int action_ok_file_load(const char *path,
|
||||
menu_list_get_last(menu->menu_list->menu_stack,
|
||||
&menu_path, &menu_label, NULL);
|
||||
|
||||
setting = menu_action_find_setting(menu_label);
|
||||
setting = menu_setting_find(menu_label);
|
||||
|
||||
if (setting && setting->type == ST_PATH)
|
||||
{
|
||||
@ -1533,7 +1533,7 @@ static int action_ok_set_path(const char *path,
|
||||
menu_list_get_last_stack(menu->menu_list,
|
||||
&menu_path, &menu_label, NULL);
|
||||
|
||||
setting = menu_action_find_setting(menu_label);
|
||||
setting = menu_setting_find(menu_label);
|
||||
|
||||
if (!setting)
|
||||
return -1;
|
||||
@ -1779,7 +1779,7 @@ static int action_ok_shader_apply_changes(const char *path,
|
||||
static int action_ok_lookup_setting(const char *path,
|
||||
const char *label, unsigned type, size_t idx)
|
||||
{
|
||||
return menu_action_setting_set(type, label, MENU_ACTION_OK);
|
||||
return menu_setting_set(type, label, MENU_ACTION_OK);
|
||||
}
|
||||
|
||||
static int action_ok_rdb_entry_submenu(const char *path,
|
||||
@ -1853,7 +1853,7 @@ static int action_ok_rdb_entry_submenu(const char *path,
|
||||
static int action_cancel_lookup_setting(const char *path,
|
||||
const char *label, unsigned type, size_t idx)
|
||||
{
|
||||
return menu_action_setting_set(type, label, MENU_ACTION_CANCEL);
|
||||
return menu_setting_set(type, label, MENU_ACTION_CANCEL);
|
||||
}
|
||||
|
||||
static int action_cancel_pop_default(const char *path,
|
||||
@ -2348,9 +2348,9 @@ static int action_toggle_shader_filter_default(unsigned type, const char *label,
|
||||
unsigned action)
|
||||
{
|
||||
#ifdef HAVE_SHADER_MANAGER
|
||||
rarch_setting_t *setting = menu_action_find_setting("video_smooth");
|
||||
rarch_setting_t *setting = menu_setting_find("video_smooth");
|
||||
if (setting)
|
||||
menu_action_setting_handler(setting, action);
|
||||
menu_setting_handler(setting, action);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
@ -3073,7 +3073,7 @@ static int deferred_push_settings(void *data, void *userdata,
|
||||
settings_list_free(menu->list_settings);
|
||||
menu->list_settings = (rarch_setting_t *)setting_data_new(SL_FLAG_ALL_SETTINGS);
|
||||
|
||||
setting = menu_action_find_setting("Driver Settings");
|
||||
setting = menu_setting_find("Driver Settings");
|
||||
|
||||
menu_list_clear(list);
|
||||
|
||||
@ -3157,7 +3157,7 @@ static int deferred_push_settings_subgroup(void *data, void *userdata,
|
||||
settings_list_free(menu->list_settings);
|
||||
menu->list_settings = (rarch_setting_t *)setting_data_new(SL_FLAG_ALL_SETTINGS);
|
||||
|
||||
setting = menu_action_find_setting(elem0);
|
||||
setting = menu_setting_find(elem0);
|
||||
|
||||
menu_list_clear(list);
|
||||
|
||||
@ -3866,7 +3866,7 @@ static int deferred_push_default(void *data, void *userdata,
|
||||
file_list_t *list = (file_list_t*)data;
|
||||
file_list_t *menu_list = (file_list_t*)userdata;
|
||||
rarch_setting_t *setting = (rarch_setting_t*)
|
||||
menu_action_find_setting(label);
|
||||
menu_setting_find(label);
|
||||
|
||||
if (!list || !menu_list)
|
||||
return -1;
|
||||
@ -4528,7 +4528,7 @@ static int action_select_default(unsigned type, const char *label,
|
||||
static int action_start_lookup_setting(unsigned type, const char *label,
|
||||
unsigned action)
|
||||
{
|
||||
return menu_action_setting_set(type, label, MENU_ACTION_START);
|
||||
return menu_setting_set(type, label, MENU_ACTION_START);
|
||||
}
|
||||
|
||||
static void menu_action_setting_disp_set_label_cheat_num_passes(
|
||||
@ -5376,7 +5376,7 @@ static void menu_entries_cbs_init_bind_ok(menu_file_list_cbs_t *cbs,
|
||||
const char *path, const char *label, unsigned type, size_t idx,
|
||||
const char *elem0, const char *elem1, const char *menu_label)
|
||||
{
|
||||
rarch_setting_t *setting = menu_action_find_setting(label);
|
||||
rarch_setting_t *setting = menu_setting_find(label);
|
||||
menu_handle_t *menu = menu_driver_resolve();
|
||||
if (!menu)
|
||||
return;
|
||||
@ -5624,7 +5624,7 @@ static void menu_entries_cbs_init_bind_toggle(menu_file_list_cbs_t *cbs,
|
||||
}
|
||||
}
|
||||
|
||||
cbs->action_toggle = menu_action_setting_set;
|
||||
cbs->action_toggle = menu_setting_set;
|
||||
|
||||
switch (type)
|
||||
{
|
||||
@ -5702,7 +5702,7 @@ static void menu_entries_cbs_init_bind_toggle(menu_file_list_cbs_t *cbs,
|
||||
snprintf(label_setting, sizeof(label_setting), "input_player%d_joypad_index", i + 1);
|
||||
|
||||
if (!strcmp(label, label_setting))
|
||||
cbs->action_toggle = menu_action_setting_set;
|
||||
cbs->action_toggle = menu_setting_set;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include <string.h>
|
||||
#include "menu_input.h"
|
||||
#include "menu.h"
|
||||
#include "menu_action.h"
|
||||
#include "menu_setting.h"
|
||||
#include "menu_shader.h"
|
||||
#include "menu_navigation.h"
|
||||
#include "../cheats.h"
|
||||
|
@ -14,11 +14,11 @@
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "menu_action.h"
|
||||
#include "menu_setting.h"
|
||||
#include "menu_entries.h"
|
||||
#include "../retroarch.h"
|
||||
|
||||
int menu_action_generic_setting(rarch_setting_t *setting)
|
||||
int menu_setting_generic(rarch_setting_t *setting)
|
||||
{
|
||||
if (!setting)
|
||||
return -1;
|
||||
@ -39,9 +39,7 @@ int menu_action_generic_setting(rarch_setting_t *setting)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void process_setting_handler(
|
||||
rarch_setting_t *setting,
|
||||
unsigned action)
|
||||
static void setting_handler(rarch_setting_t *setting, unsigned action)
|
||||
{
|
||||
if (!setting)
|
||||
return;
|
||||
@ -73,11 +71,11 @@ static void process_setting_handler(
|
||||
}
|
||||
}
|
||||
|
||||
int menu_action_setting_handler(rarch_setting_t *setting, unsigned action)
|
||||
int menu_setting_handler(rarch_setting_t *setting, unsigned action)
|
||||
{
|
||||
process_setting_handler(setting, action);
|
||||
setting_handler(setting, action);
|
||||
|
||||
return menu_action_generic_setting(setting);
|
||||
return menu_setting_generic(setting);
|
||||
}
|
||||
|
||||
static int menu_action_handle_setting(rarch_setting_t *setting,
|
||||
@ -105,24 +103,24 @@ static int menu_action_handle_setting(rarch_setting_t *setting,
|
||||
case ST_DIR:
|
||||
case ST_BIND:
|
||||
case ST_ACTION:
|
||||
process_setting_handler(setting, action);
|
||||
setting_handler(setting, action);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return menu_action_generic_setting(setting);
|
||||
return menu_setting_generic(setting);
|
||||
}
|
||||
|
||||
rarch_setting_t *menu_action_find_setting(const char *label)
|
||||
rarch_setting_t *menu_setting_find(const char *label)
|
||||
{
|
||||
return (rarch_setting_t*)setting_data_find_setting(
|
||||
driver.menu->list_settings, label);
|
||||
}
|
||||
|
||||
int menu_action_setting_set(unsigned type, const char *label, unsigned action)
|
||||
int menu_setting_set(unsigned type, const char *label, unsigned action)
|
||||
{
|
||||
rarch_setting_t *setting = menu_action_find_setting(
|
||||
rarch_setting_t *setting = menu_setting_find(
|
||||
driver.menu->menu_list->selection_buf->list
|
||||
[driver.menu->navigation.selection_ptr].label);
|
||||
|
@ -14,8 +14,8 @@
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef _MENU_ACTION_H
|
||||
#define _MENU_ACTION_H
|
||||
#ifndef _MENU_SETTING_H
|
||||
#define _MENU_SETTING_H
|
||||
|
||||
#include "../settings_list.h"
|
||||
|
||||
@ -23,18 +23,17 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
int menu_action_generic_setting(rarch_setting_t *setting);
|
||||
int menu_setting_generic(rarch_setting_t *setting);
|
||||
|
||||
int menu_action_setting_handler(
|
||||
rarch_setting_t *setting, unsigned action);
|
||||
int menu_setting_handler(rarch_setting_t *setting, unsigned action);
|
||||
|
||||
int menu_action_setting_set_current_string(
|
||||
rarch_setting_t *setting, const char *str);
|
||||
|
||||
int menu_action_setting_set(unsigned type, const char *label,
|
||||
int menu_setting_set(unsigned type, const char *label,
|
||||
unsigned action);
|
||||
|
||||
rarch_setting_t *menu_action_find_setting(const char *label);
|
||||
rarch_setting_t *menu_setting_find(const char *label);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
Loading…
Reference in New Issue
Block a user