mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-26 17:50:56 +00:00
Override bind save + menu manager overhaul (#14895)
* Input bind override conf saving * Override menu overhaul
This commit is contained in:
parent
9a0ecaab4b
commit
c6dc92fc07
78
command.c
78
command.c
@ -1062,6 +1062,9 @@ bool command_event_save_config(
|
||||
return true;
|
||||
}
|
||||
|
||||
if (runloop_get_flags() & RUNLOOP_FLAG_OVERRIDES_ACTIVE)
|
||||
return false;
|
||||
|
||||
if (!string_is_empty(str))
|
||||
{
|
||||
snprintf(s, len, "%s \"%s\".",
|
||||
@ -1564,18 +1567,20 @@ void command_event_save_current_config(enum override_type type)
|
||||
|
||||
switch (type)
|
||||
{
|
||||
default:
|
||||
case OVERRIDE_NONE:
|
||||
{
|
||||
char msg[256];
|
||||
|
||||
msg[0] = '\0';
|
||||
|
||||
if (path_is_empty(RARCH_PATH_CONFIG))
|
||||
{
|
||||
char msg[128];
|
||||
strlcpy(msg, "[Config]: Config directory not set, cannot save configuration.", sizeof(msg));
|
||||
runloop_msg_queue_push(msg, 1, 180, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
}
|
||||
else
|
||||
{
|
||||
char msg[256];
|
||||
msg[0] = '\0';
|
||||
command_event_save_config(path_get(RARCH_PATH_CONFIG), msg, sizeof(msg));
|
||||
runloop_msg_queue_push(msg, 1, 180, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
}
|
||||
@ -1585,18 +1590,77 @@ void command_event_save_current_config(enum override_type type)
|
||||
case OVERRIDE_CORE:
|
||||
case OVERRIDE_CONTENT_DIR:
|
||||
{
|
||||
char msg[128];
|
||||
if (config_save_overrides(type, &runloop_st->system))
|
||||
int8_t ret = config_save_overrides(type, &runloop_st->system, false);
|
||||
char msg[256];
|
||||
|
||||
msg[0] = '\0';
|
||||
|
||||
switch (ret)
|
||||
{
|
||||
case 1:
|
||||
strlcpy(msg, msg_hash_to_str(MSG_OVERRIDES_SAVED_SUCCESSFULLY), sizeof(msg));
|
||||
/* set overrides to active so the original config can be
|
||||
restored after closing content */
|
||||
runloop_st->flags |= RUNLOOP_FLAG_OVERRIDES_ACTIVE;
|
||||
}
|
||||
else
|
||||
break;
|
||||
case -1:
|
||||
strlcpy(msg, msg_hash_to_str(MSG_OVERRIDES_NOT_SAVED), sizeof(msg));
|
||||
break;
|
||||
default:
|
||||
case 0:
|
||||
strlcpy(msg, msg_hash_to_str(MSG_OVERRIDES_ERROR_SAVING), sizeof(msg));
|
||||
break;
|
||||
}
|
||||
|
||||
RARCH_LOG("[Overrides]: %s\n", msg);
|
||||
runloop_msg_queue_push(msg, 1, 180, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
{
|
||||
bool refresh = false;
|
||||
|
||||
menu_entries_ctl(MENU_ENTRIES_CTL_SET_REFRESH, &refresh);
|
||||
menu_driver_ctl(RARCH_MENU_CTL_SET_PREVENT_POPULATE, NULL);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void command_event_remove_current_config(enum override_type type)
|
||||
{
|
||||
runloop_state_t *runloop_st = runloop_state_get_ptr();
|
||||
|
||||
switch (type)
|
||||
{
|
||||
default:
|
||||
case OVERRIDE_NONE:
|
||||
break;
|
||||
case OVERRIDE_GAME:
|
||||
case OVERRIDE_CORE:
|
||||
case OVERRIDE_CONTENT_DIR:
|
||||
{
|
||||
char msg[256];
|
||||
|
||||
msg[0] = '\0';
|
||||
|
||||
if (config_save_overrides(type, &runloop_st->system, true))
|
||||
strlcpy(msg, msg_hash_to_str(MSG_OVERRIDES_REMOVED_SUCCESSFULLY), sizeof(msg));
|
||||
else
|
||||
strlcpy(msg, msg_hash_to_str(MSG_OVERRIDES_ERROR_REMOVING), sizeof(msg));
|
||||
|
||||
RARCH_LOG("[Overrides]: %s\n", msg);
|
||||
runloop_msg_queue_push(msg, 1, 180, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
{
|
||||
bool refresh = false;
|
||||
|
||||
menu_entries_ctl(MENU_ENTRIES_CTL_SET_REFRESH, &refresh);
|
||||
menu_driver_ctl(RARCH_MENU_CTL_SET_PREVENT_POPULATE, NULL);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
12
command.h
12
command.h
@ -186,11 +186,14 @@ enum event_command
|
||||
CMD_EVENT_MENU_TOGGLE,
|
||||
/* Configuration saving. */
|
||||
CMD_EVENT_MENU_RESET_TO_DEFAULT_CONFIG,
|
||||
CMD_EVENT_MENU_SAVE_CONFIG,
|
||||
CMD_EVENT_MENU_SAVE_CURRENT_CONFIG,
|
||||
CMD_EVENT_MENU_SAVE_CURRENT_CONFIG_OVERRIDE_CORE,
|
||||
CMD_EVENT_MENU_SAVE_CURRENT_CONFIG_OVERRIDE_CONTENT_DIR,
|
||||
CMD_EVENT_MENU_SAVE_CURRENT_CONFIG_OVERRIDE_GAME,
|
||||
CMD_EVENT_MENU_SAVE_CONFIG,
|
||||
CMD_EVENT_MENU_REMOVE_CURRENT_CONFIG_OVERRIDE_CORE,
|
||||
CMD_EVENT_MENU_REMOVE_CURRENT_CONFIG_OVERRIDE_CONTENT_DIR,
|
||||
CMD_EVENT_MENU_REMOVE_CURRENT_CONFIG_OVERRIDE_GAME,
|
||||
/* Applies shader changes. */
|
||||
CMD_EVENT_SHADERS_APPLY_CHANGES,
|
||||
/* A new shader preset has been loaded */
|
||||
@ -559,6 +562,13 @@ bool command_event_save_core_config(
|
||||
* autosave state.
|
||||
**/
|
||||
void command_event_save_current_config(enum override_type type);
|
||||
|
||||
/**
|
||||
* command_event_remove_current_config:
|
||||
*
|
||||
* Removes current configuration file from disk.
|
||||
**/
|
||||
void command_event_remove_current_config(enum override_type type);
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
278
configuration.c
278
configuration.c
@ -3492,14 +3492,14 @@ static bool config_load_file(global_t *global,
|
||||
_len = strlcpy(prefix, "input_player", sizeof(prefix));
|
||||
snprintf(prefix + _len, sizeof(prefix) - _len, "%u", i + 1);
|
||||
|
||||
strlcpy(buf, prefix, sizeof(buf));
|
||||
strlcat(buf, "_joypad_index", sizeof(buf));
|
||||
CONFIG_GET_INT_BASE(conf, settings, uints.input_joypad_index[i], buf);
|
||||
|
||||
strlcpy(buf, prefix, sizeof(buf));
|
||||
strlcat(buf, "_analog_dpad_mode", sizeof(buf));
|
||||
CONFIG_GET_INT_BASE(conf, settings, uints.input_analog_dpad_mode[i], buf);
|
||||
|
||||
strlcpy(buf, prefix, sizeof(buf));
|
||||
strlcat(buf, "_joypad_index", sizeof(buf));
|
||||
CONFIG_GET_INT_BASE(conf, settings, uints.input_joypad_index[i], buf);
|
||||
|
||||
strlcpy(buf, prefix, sizeof(buf));
|
||||
strlcat(buf, "_mouse_index", sizeof(buf));
|
||||
CONFIG_GET_INT_BASE(conf, settings, uints.input_mouse_index[i], buf);
|
||||
@ -3687,7 +3687,7 @@ static bool config_load_file(global_t *global,
|
||||
*settings->paths.directory_screenshot = '\0';
|
||||
else if (!path_is_directory(settings->paths.directory_screenshot))
|
||||
{
|
||||
RARCH_WARN("[Config]: 'screenshot_directory' is not an existing directory, ignoring ...\n");
|
||||
RARCH_WARN("[Config]: 'screenshot_directory' is not an existing directory, ignoring..\n");
|
||||
*settings->paths.directory_screenshot = '\0';
|
||||
}
|
||||
}
|
||||
@ -3812,7 +3812,7 @@ static bool config_load_file(global_t *global,
|
||||
sizeof(runloop_st->name.savefile));
|
||||
}
|
||||
else
|
||||
RARCH_WARN("[Config]: 'savefile_directory' is not a directory, ignoring ...\n");
|
||||
RARCH_WARN("[Config]: 'savefile_directory' is not a directory, ignoring..\n");
|
||||
}
|
||||
|
||||
if (!retroarch_override_setting_is_set(RARCH_OVERRIDE_SETTING_STATE_PATH, NULL) &&
|
||||
@ -3832,7 +3832,7 @@ static bool config_load_file(global_t *global,
|
||||
sizeof(runloop_st->name.savestate));
|
||||
}
|
||||
else
|
||||
RARCH_WARN("[Config]: 'savestate_directory' is not a directory, ignoring ...\n");
|
||||
RARCH_WARN("[Config]: 'savestate_directory' is not a directory, ignoring..\n");
|
||||
}
|
||||
|
||||
config_read_keybinds_conf(conf);
|
||||
@ -3859,7 +3859,7 @@ static bool config_load_file(global_t *global,
|
||||
!frontend_driver_set_gamemode(settings->bools.gamemode_enable) &&
|
||||
settings->bools.gamemode_enable)
|
||||
{
|
||||
RARCH_WARN("[Config]: GameMode unsupported - disabling...\n");
|
||||
RARCH_WARN("[Config]: GameMode unsupported - disabling..\n");
|
||||
configuration_set_bool(settings,
|
||||
settings->bools.gamemode_enable, false);
|
||||
}
|
||||
@ -3941,6 +3941,8 @@ bool config_load_override(void *data)
|
||||
content_dir_name[0] = '\0';
|
||||
config_directory[0] = '\0';
|
||||
|
||||
path_clear(RARCH_PATH_CONFIG_OVERRIDE);
|
||||
|
||||
/* Cannot load an override if we have no core */
|
||||
if (string_is_empty(core_name))
|
||||
return false;
|
||||
@ -4007,6 +4009,7 @@ bool config_load_override(void *data)
|
||||
strlcpy(tmp_path, core_path, sizeof(tmp_path));
|
||||
|
||||
path_set(RARCH_PATH_CONFIG_APPEND, tmp_path);
|
||||
path_set(RARCH_PATH_CONFIG_OVERRIDE, tmp_path);
|
||||
|
||||
should_append = true;
|
||||
show_notification = true;
|
||||
@ -4037,6 +4040,7 @@ bool config_load_override(void *data)
|
||||
strlcpy(tmp_path, content_path, sizeof(tmp_path));
|
||||
|
||||
path_set(RARCH_PATH_CONFIG_APPEND, tmp_path);
|
||||
path_set(RARCH_PATH_CONFIG_OVERRIDE, tmp_path);
|
||||
|
||||
should_append = true;
|
||||
show_notification = true;
|
||||
@ -4065,6 +4069,7 @@ bool config_load_override(void *data)
|
||||
strlcpy(tmp_path, game_path, sizeof(tmp_path));
|
||||
|
||||
path_set(RARCH_PATH_CONFIG_APPEND, tmp_path);
|
||||
path_set(RARCH_PATH_CONFIG_OVERRIDE, tmp_path);
|
||||
|
||||
should_append = true;
|
||||
show_notification = true;
|
||||
@ -4100,6 +4105,58 @@ bool config_load_override(void *data)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool config_load_override_file(const char *config_path)
|
||||
{
|
||||
char config_directory[PATH_MAX_LENGTH];
|
||||
bool should_append = false;
|
||||
bool show_notification = true;
|
||||
settings_t *settings = config_st;
|
||||
|
||||
config_directory[0] = '\0';
|
||||
|
||||
path_clear(RARCH_PATH_CONFIG_OVERRIDE);
|
||||
|
||||
/* Get base config directory */
|
||||
fill_pathname_application_special(config_directory,
|
||||
sizeof(config_directory),
|
||||
APPLICATION_SPECIAL_DIRECTORY_CONFIG);
|
||||
|
||||
if (path_is_valid(config_path))
|
||||
{
|
||||
path_set(RARCH_PATH_CONFIG_APPEND, config_path);
|
||||
path_set(RARCH_PATH_CONFIG_OVERRIDE, config_path);
|
||||
should_append = true;
|
||||
}
|
||||
|
||||
if (!should_append)
|
||||
return false;
|
||||
|
||||
/* Re-load the configuration with any overrides
|
||||
* that might have been found */
|
||||
|
||||
/* Toggle has_save_path to false so it resets */
|
||||
retroarch_override_setting_unset(RARCH_OVERRIDE_SETTING_STATE_PATH, NULL);
|
||||
retroarch_override_setting_unset(RARCH_OVERRIDE_SETTING_SAVE_PATH, NULL);
|
||||
|
||||
if (!config_load_file(global_get_ptr(),
|
||||
path_get(RARCH_PATH_CONFIG), settings))
|
||||
return false;
|
||||
|
||||
if (settings->bools.notification_show_config_override_load
|
||||
&& show_notification)
|
||||
runloop_msg_queue_push(msg_hash_to_str(MSG_CONFIG_OVERRIDE_LOADED),
|
||||
1, 100, false,
|
||||
NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
|
||||
/* Reset save paths. */
|
||||
retroarch_override_setting_set(RARCH_OVERRIDE_SETTING_STATE_PATH, NULL);
|
||||
retroarch_override_setting_set(RARCH_OVERRIDE_SETTING_SAVE_PATH, NULL);
|
||||
|
||||
path_clear(RARCH_PATH_CONFIG_APPEND);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* config_unload_override:
|
||||
*
|
||||
@ -4111,6 +4168,7 @@ bool config_load_override(void *data)
|
||||
bool config_unload_override(void)
|
||||
{
|
||||
path_clear(RARCH_PATH_CONFIG_APPEND);
|
||||
path_clear(RARCH_PATH_CONFIG_OVERRIDE);
|
||||
|
||||
/* Toggle has_save_path to false so it resets */
|
||||
retroarch_override_setting_unset(RARCH_OVERRIDE_SETTING_STATE_PATH, NULL);
|
||||
@ -4535,9 +4593,59 @@ static void input_config_save_keybinds_user(config_file_t *conf, unsigned user)
|
||||
fill_pathname_join_delim(key, prefix, base, '_', sizeof(key));
|
||||
|
||||
input_keymaps_translate_rk_to_str(bind->key, btn, sizeof(btn));
|
||||
|
||||
config_set_string(conf, key, btn);
|
||||
input_config_save_keybind(conf, prefix, base, bind, true);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* input_config_save_keybinds_user_override:
|
||||
* @conf : pointer to config file object
|
||||
* @user : user number
|
||||
* @bind_id : bind number
|
||||
* @override_bind : override retro_keybind for comparison and saving
|
||||
*
|
||||
* Save the current bind (@override_bind) override of a user (@user) to the
|
||||
* config file (@conf), and skip binds that are not modified.
|
||||
*/
|
||||
static void input_config_save_keybinds_user_override(config_file_t *conf,
|
||||
unsigned user, unsigned bind_id,
|
||||
const struct retro_keybind *override_bind)
|
||||
{
|
||||
unsigned i = bind_id;
|
||||
|
||||
if (input_config_bind_map_get_valid(i))
|
||||
{
|
||||
char key[64];
|
||||
char btn[64];
|
||||
const struct input_bind_map *keybind =
|
||||
(const struct input_bind_map*)INPUT_CONFIG_BIND_MAP_GET(i);
|
||||
bool meta = keybind ? keybind->meta : false;
|
||||
const char *prefix = input_config_get_prefix(user, meta);
|
||||
const struct retro_keybind *bind = &input_config_binds[user][i];
|
||||
const char *base = NULL;
|
||||
|
||||
if (!prefix || !bind->valid || !keybind)
|
||||
return;
|
||||
|
||||
base = keybind->base;
|
||||
btn[0] = '\0';
|
||||
|
||||
fill_pathname_join_delim(key, prefix, base, '_', sizeof(key));
|
||||
|
||||
input_keymaps_translate_rk_to_str(override_bind->key, btn, sizeof(btn));
|
||||
|
||||
config_set_string(conf, key, btn);
|
||||
|
||||
input_config_save_keybind(conf, prefix, base, bind, true);
|
||||
if (bind->joykey != override_bind->joykey)
|
||||
save_keybind_joykey (conf, prefix, base, override_bind, true);
|
||||
if (bind->joyaxis != override_bind->joyaxis)
|
||||
save_keybind_axis (conf, prefix, base, override_bind, true);
|
||||
if (bind->mbutton != override_bind->mbutton)
|
||||
save_keybind_mbutton(conf, prefix, base, override_bind, true);
|
||||
|
||||
RARCH_DBG("[Overrides]: %s = \"%s\"\n", key, btn);
|
||||
}
|
||||
}
|
||||
|
||||
@ -4810,14 +4918,17 @@ bool config_save_file(const char *path)
|
||||
strlcpy(cfg, "input_device_p", sizeof(cfg));
|
||||
strlcat(cfg, formatted_number, sizeof(cfg));
|
||||
config_set_int(conf, cfg, settings->uints.input_device[i]);
|
||||
strlcpy(cfg, "input_player", sizeof(cfg));
|
||||
strlcat(cfg, formatted_number, sizeof(cfg));
|
||||
strlcat(cfg, "_joypad_index", sizeof(cfg));
|
||||
config_set_int(conf, cfg, settings->uints.input_joypad_index[i]);
|
||||
|
||||
strlcpy(cfg, "input_player", sizeof(cfg));
|
||||
strlcat(cfg, formatted_number, sizeof(cfg));
|
||||
strlcat(cfg, "_analog_dpad_mode", sizeof(cfg));
|
||||
config_set_int(conf, cfg, settings->uints.input_analog_dpad_mode[i]);
|
||||
|
||||
strlcpy(cfg, "input_player", sizeof(cfg));
|
||||
strlcat(cfg, formatted_number, sizeof(cfg));
|
||||
strlcat(cfg, "_joypad_index", sizeof(cfg));
|
||||
config_set_int(conf, cfg, settings->uints.input_joypad_index[i]);
|
||||
|
||||
strlcpy(cfg, "input_player", sizeof(cfg));
|
||||
strlcat(cfg, formatted_number, sizeof(cfg));
|
||||
strlcat(cfg, "_mouse_index", sizeof(cfg));
|
||||
@ -4905,13 +5016,15 @@ bool config_save_file(const char *path)
|
||||
*
|
||||
* Writes a config file override to disk.
|
||||
*
|
||||
* Returns: true (1) on success, otherwise returns false (0).
|
||||
* Returns: true (1) on success, (-1) if nothing to write, otherwise returns false (0).
|
||||
**/
|
||||
bool config_save_overrides(enum override_type type, void *data)
|
||||
int8_t config_save_overrides(enum override_type type, void *data, bool remove)
|
||||
{
|
||||
int tmp_i = 0;
|
||||
unsigned i = 0;
|
||||
bool ret = false;
|
||||
int8_t ret = 0;
|
||||
retro_keybind_set input_override_binds[MAX_USERS]
|
||||
= {0};
|
||||
config_file_t *conf = NULL;
|
||||
settings_t *settings = NULL;
|
||||
struct config_bool_setting *bool_settings = NULL;
|
||||
@ -4930,10 +5043,8 @@ bool config_save_overrides(enum override_type type, void *data)
|
||||
struct config_path_setting *path_overrides = NULL;
|
||||
char config_directory[PATH_MAX_LENGTH];
|
||||
char override_directory[PATH_MAX_LENGTH];
|
||||
char core_path[PATH_MAX_LENGTH];
|
||||
char game_path[PATH_MAX_LENGTH];
|
||||
char content_path[PATH_MAX_LENGTH];
|
||||
char content_dir_name[PATH_MAX_LENGTH];
|
||||
char override_path[PATH_MAX_LENGTH];
|
||||
settings_t *overrides = config_st;
|
||||
int bool_settings_size = sizeof(settings->bools) / sizeof(settings->bools.placeholder);
|
||||
int float_settings_size = sizeof(settings->floats) / sizeof(settings->floats.placeholder);
|
||||
@ -4948,10 +5059,8 @@ bool config_save_overrides(enum override_type type, void *data)
|
||||
const char *game_name = NULL;
|
||||
bool has_content = !string_is_empty(rarch_path_basename);
|
||||
|
||||
core_path[0] = '\0';
|
||||
game_path[0] = '\0';
|
||||
content_path[0] = '\0';
|
||||
content_dir_name[0] = '\0';
|
||||
override_path[0] = '\0';
|
||||
|
||||
/* > Cannot save an override if we have no core
|
||||
* > Cannot save a per-game or per-content-directory
|
||||
@ -4976,6 +5085,9 @@ bool config_save_overrides(enum override_type type, void *data)
|
||||
if (!path_is_directory(override_directory))
|
||||
path_mkdir(override_directory);
|
||||
|
||||
/* Store current binds as override binds */
|
||||
memcpy(input_override_binds, input_config_binds, sizeof(input_override_binds));
|
||||
|
||||
/* Load the original config file in memory */
|
||||
config_load_file(global_get_ptr(),
|
||||
path_get(RARCH_PATH_CONFIG), settings);
|
||||
@ -5008,39 +5120,61 @@ bool config_save_overrides(enum override_type type, void *data)
|
||||
tmp_i = sizeof(settings->paths) / sizeof(settings->paths.placeholder);
|
||||
path_overrides = populate_settings_path(overrides, &tmp_i);
|
||||
|
||||
RARCH_LOG("[Overrides]: Looking for changed settings... \n");
|
||||
if (conf->modified)
|
||||
RARCH_LOG("[Overrides]: Looking for changed settings..\n");
|
||||
|
||||
if (conf)
|
||||
{
|
||||
for (i = 0; i < (unsigned)bool_settings_size; i++)
|
||||
{
|
||||
if ((*bool_settings[i].ptr) != (*bool_overrides[i].ptr))
|
||||
{
|
||||
config_set_string(conf, bool_overrides[i].ident,
|
||||
(*bool_overrides[i].ptr) ? "true" : "false");
|
||||
RARCH_DBG("[Overrides]: %s = \"%s\"\n",
|
||||
bool_overrides[i].ident,
|
||||
(*bool_overrides[i].ptr) ? "true" : "false");
|
||||
}
|
||||
}
|
||||
for (i = 0; i < (unsigned)int_settings_size; i++)
|
||||
{
|
||||
if ((*int_settings[i].ptr) != (*int_overrides[i].ptr))
|
||||
{
|
||||
config_set_int(conf, int_overrides[i].ident,
|
||||
(*int_overrides[i].ptr));
|
||||
RARCH_DBG("[Overrides]: %s = \"%d\"\n",
|
||||
int_overrides[i].ident, *int_overrides[i].ptr);
|
||||
}
|
||||
}
|
||||
for (i = 0; i < (unsigned)uint_settings_size; i++)
|
||||
{
|
||||
if ((*uint_settings[i].ptr) != (*uint_overrides[i].ptr))
|
||||
{
|
||||
config_set_int(conf, uint_overrides[i].ident,
|
||||
(*uint_overrides[i].ptr));
|
||||
RARCH_DBG("[Overrides]: %s = \"%d\"\n",
|
||||
uint_overrides[i].ident, *uint_overrides[i].ptr);
|
||||
}
|
||||
}
|
||||
for (i = 0; i < (unsigned)size_settings_size; i++)
|
||||
{
|
||||
if ((*size_settings[i].ptr) != (*size_overrides[i].ptr))
|
||||
{
|
||||
config_set_int(conf, size_overrides[i].ident,
|
||||
(int)(*size_overrides[i].ptr));
|
||||
RARCH_DBG("[Overrides]: %s = \"%d\"\n",
|
||||
size_overrides[i].ident, *size_overrides[i].ptr);
|
||||
}
|
||||
}
|
||||
for (i = 0; i < (unsigned)float_settings_size; i++)
|
||||
{
|
||||
if ((*float_settings[i].ptr) != (*float_overrides[i].ptr))
|
||||
{
|
||||
config_set_float(conf, float_overrides[i].ident,
|
||||
*float_overrides[i].ptr);
|
||||
RARCH_DBG("[Overrides]: %s = \"%f\"\n",
|
||||
float_overrides[i].ident, *float_overrides[i].ptr);
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < (unsigned)array_settings_size; i++)
|
||||
@ -5065,18 +5199,25 @@ bool config_save_overrides(enum override_type type, void *data)
|
||||
#endif
|
||||
config_set_string(conf, array_overrides[i].ident,
|
||||
array_overrides[i].ptr);
|
||||
RARCH_DBG("[Overrides]: %s = \"%s\"\n",
|
||||
array_overrides[i].ident, *array_overrides[i].ptr);
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < (unsigned)path_settings_size; i++)
|
||||
{
|
||||
if (!string_is_equal(path_settings[i].ptr, path_overrides[i].ptr))
|
||||
{
|
||||
config_set_path(conf, path_overrides[i].ident,
|
||||
path_overrides[i].ptr);
|
||||
RARCH_DBG("[Overrides]: %s = \"%s\"\n",
|
||||
path_overrides[i].ident, *path_overrides[i].ptr);
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < MAX_USERS; i++)
|
||||
{
|
||||
uint8_t j;
|
||||
char cfg[64];
|
||||
char formatted_number[4];
|
||||
cfg[0] = formatted_number[0] = '\0';
|
||||
@ -5089,6 +5230,17 @@ bool config_save_overrides(enum override_type type, void *data)
|
||||
strlcpy(cfg, "input_device_p", sizeof(cfg));
|
||||
strlcat(cfg, formatted_number, sizeof(cfg));
|
||||
config_set_int(conf, cfg, overrides->uints.input_device[i]);
|
||||
RARCH_DBG("[Overrides]: %s = \"%u\"\n", cfg, overrides->uints.input_device[i]);
|
||||
}
|
||||
|
||||
if (settings->uints.input_analog_dpad_mode[i]
|
||||
!= overrides->uints.input_analog_dpad_mode[i])
|
||||
{
|
||||
strlcpy(cfg, "input_player", sizeof(cfg));
|
||||
strlcat(cfg, formatted_number, sizeof(cfg));
|
||||
strlcat(cfg, "_analog_dpad_mode", sizeof(cfg));
|
||||
config_set_int(conf, cfg, overrides->uints.input_analog_dpad_mode[i]);
|
||||
RARCH_DBG("[Overrides]: %s = \"%u\"\n", cfg, overrides->uints.input_analog_dpad_mode[i]);
|
||||
}
|
||||
|
||||
if (settings->uints.input_joypad_index[i]
|
||||
@ -5096,53 +5248,105 @@ bool config_save_overrides(enum override_type type, void *data)
|
||||
{
|
||||
strlcpy(cfg, "input_player", sizeof(cfg));
|
||||
strlcat(cfg, formatted_number, sizeof(cfg));
|
||||
strlcpy(cfg, "_joypad_index", sizeof(cfg));
|
||||
strlcat(cfg, "_joypad_index", sizeof(cfg));
|
||||
config_set_int(conf, cfg, overrides->uints.input_joypad_index[i]);
|
||||
RARCH_DBG("[Overrides]: %s = \"%u\"\n", cfg, overrides->uints.input_joypad_index[i]);
|
||||
}
|
||||
|
||||
if (settings->uints.input_mouse_index[i]
|
||||
!= overrides->uints.input_mouse_index[i])
|
||||
{
|
||||
strlcpy(cfg, "input_player", sizeof(cfg));
|
||||
strlcat(cfg, formatted_number, sizeof(cfg));
|
||||
strlcat(cfg, "_mouse_index", sizeof(cfg));
|
||||
config_set_int(conf, cfg, overrides->uints.input_mouse_index[i]);
|
||||
RARCH_DBG("[Overrides]: %s = \"%u\"\n", cfg, overrides->uints.input_mouse_index[i]);
|
||||
}
|
||||
|
||||
for (j = 0; j < RARCH_BIND_LIST_END; j++)
|
||||
{
|
||||
const struct retro_keybind *override_bind = &input_override_binds[i][j];
|
||||
const struct retro_keybind *config_bind = &input_config_binds[i][j];
|
||||
|
||||
if ( config_bind->joyaxis != override_bind->joyaxis
|
||||
|| config_bind->joykey != override_bind->joykey
|
||||
|| config_bind->key != override_bind->key
|
||||
|| config_bind->mbutton != override_bind->mbutton
|
||||
)
|
||||
input_config_save_keybinds_user_override(conf, i, j, override_bind);
|
||||
}
|
||||
}
|
||||
|
||||
ret = false;
|
||||
ret = 0;
|
||||
|
||||
switch (type)
|
||||
{
|
||||
case OVERRIDE_CORE:
|
||||
fill_pathname_join_special_ext(core_path,
|
||||
fill_pathname_join_special_ext(override_path,
|
||||
config_directory, core_name,
|
||||
core_name,
|
||||
FILE_PATH_CONFIG_EXTENSION,
|
||||
sizeof(core_path));
|
||||
RARCH_LOG ("[Overrides]: Path \"%s\".\n", core_path);
|
||||
ret = config_file_write(conf, core_path, true);
|
||||
sizeof(override_path));
|
||||
break;
|
||||
case OVERRIDE_GAME:
|
||||
game_name = path_basename_nocompression(rarch_path_basename);
|
||||
fill_pathname_join_special_ext(game_path,
|
||||
fill_pathname_join_special_ext(override_path,
|
||||
config_directory, core_name,
|
||||
game_name,
|
||||
FILE_PATH_CONFIG_EXTENSION,
|
||||
sizeof(game_path));
|
||||
RARCH_LOG ("[Overrides]: Path \"%s\".\n", game_path);
|
||||
ret = config_file_write(conf, game_path, true);
|
||||
sizeof(override_path));
|
||||
break;
|
||||
case OVERRIDE_CONTENT_DIR:
|
||||
fill_pathname_parent_dir_name(content_dir_name,
|
||||
rarch_path_basename, sizeof(content_dir_name));
|
||||
fill_pathname_join_special_ext(content_path,
|
||||
fill_pathname_join_special_ext(override_path,
|
||||
config_directory, core_name,
|
||||
content_dir_name,
|
||||
FILE_PATH_CONFIG_EXTENSION,
|
||||
sizeof(content_path));
|
||||
RARCH_LOG ("[Overrides]: Path \"%s\".\n", content_path);
|
||||
ret = config_file_write(conf, content_path, true);
|
||||
sizeof(override_path));
|
||||
break;
|
||||
case OVERRIDE_NONE:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (!conf->modified && !remove)
|
||||
ret = -1;
|
||||
|
||||
if (!string_is_empty(override_path))
|
||||
{
|
||||
if (!conf->modified && !remove)
|
||||
if (path_is_valid(override_path))
|
||||
remove = true;
|
||||
|
||||
if ( remove
|
||||
&& path_is_valid(override_path))
|
||||
{
|
||||
if (filestream_delete(override_path) == 0)
|
||||
{
|
||||
config_load_override(&runloop_state_get_ptr()->system);
|
||||
ret = -1;
|
||||
RARCH_LOG("[Overrides]: %s: \"%s\".\n",
|
||||
"Deleting",
|
||||
override_path);
|
||||
}
|
||||
}
|
||||
else if (conf->modified)
|
||||
{
|
||||
ret = config_file_write(conf, override_path, true);
|
||||
path_set(RARCH_PATH_CONFIG_OVERRIDE, override_path);
|
||||
RARCH_LOG("[Overrides]: %s: \"%s\".\n",
|
||||
"Saving",
|
||||
override_path);
|
||||
}
|
||||
}
|
||||
|
||||
config_file_free(conf);
|
||||
}
|
||||
|
||||
/* Since config_load_file resets binds, restore overrides back to current binds */
|
||||
memcpy(input_config_binds, input_override_binds, sizeof(input_config_binds));
|
||||
|
||||
if (bool_settings)
|
||||
free(bool_settings);
|
||||
if (bool_overrides)
|
||||
|
@ -1087,6 +1087,18 @@ const char *config_get_default_record(void);
|
||||
*/
|
||||
bool config_load_override(void *data);
|
||||
|
||||
/**
|
||||
* config_load_override_file:
|
||||
*
|
||||
* Tries to load specified configuration file.
|
||||
* These settings will always have precedence, thus this feature
|
||||
* can be used to enforce overrides.
|
||||
*
|
||||
* Returns: false if there was an error or no action was performed.
|
||||
*
|
||||
*/
|
||||
bool config_load_override_file(const char *path);
|
||||
|
||||
/**
|
||||
* config_unload_override:
|
||||
*
|
||||
@ -1132,9 +1144,9 @@ bool config_save_file(const char *path);
|
||||
*
|
||||
* Writes a config file override to disk.
|
||||
*
|
||||
* Returns: true (1) on success, otherwise returns false (0).
|
||||
* Returns: true (1) on success, (-1) if nothing to write, otherwise returns false (0).
|
||||
**/
|
||||
bool config_save_overrides(enum override_type type, void *data);
|
||||
int8_t config_save_overrides(enum override_type type, void *data, bool remove);
|
||||
|
||||
/* Replaces currently loaded configuration file with
|
||||
* another one. Will load a dummy core to flush state
|
||||
|
@ -3269,6 +3269,14 @@ MSG_HASH(
|
||||
MENU_ENUM_LABEL_SAVE_CURRENT_CONFIG,
|
||||
"save_current_config"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_OVERRIDE_FILE_LOAD,
|
||||
"override_file_load"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_OVERRIDE_UNLOAD,
|
||||
"override_unload"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_SAVE_CURRENT_CONFIG_OVERRIDE_CORE,
|
||||
"save_current_config_override_core"
|
||||
@ -3281,6 +3289,18 @@ MSG_HASH(
|
||||
MENU_ENUM_LABEL_SAVE_CURRENT_CONFIG_OVERRIDE_GAME,
|
||||
"save_current_config_override_game"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_REMOVE_CURRENT_CONFIG_OVERRIDE_CORE,
|
||||
"remove_current_config_override_core"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_REMOVE_CURRENT_CONFIG_OVERRIDE_CONTENT_DIR,
|
||||
"remove_current_config_override_content_dir"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_REMOVE_CURRENT_CONFIG_OVERRIDE_GAME,
|
||||
"remove_current_config_override_game"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_SAVE_NEW_CONFIG,
|
||||
"save_new_config"
|
||||
|
@ -8258,7 +8258,11 @@ MSG_HASH(
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_CORE_OPTION_OVERRIDE_INFO,
|
||||
"Active Options File:"
|
||||
"Active Options File"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_CORE_OPTION_OVERRIDE_INFO,
|
||||
"The current option file in use."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_CORE_OPTIONS_RESET,
|
||||
@ -8302,7 +8306,11 @@ MSG_HASH(
|
||||
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_REMAP_FILE_INFO,
|
||||
"Active Remap File:"
|
||||
"Active Remap File"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_REMAP_FILE_INFO,
|
||||
"The current remap file in use."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_REMAP_FILE_LOAD,
|
||||
@ -9018,6 +9026,22 @@ MSG_HASH(
|
||||
|
||||
/* Quick Menu > Overrides */
|
||||
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_OVERRIDE_FILE_INFO,
|
||||
"Active Override File"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_OVERRIDE_FILE_INFO,
|
||||
"The current override file in use."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_OVERRIDE_FILE_LOAD,
|
||||
"Load Override File"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_OVERRIDE_FILE_LOAD,
|
||||
"Load and replace current configuration."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_SAVE_CURRENT_CONFIG_OVERRIDE_CORE,
|
||||
"Save Core Overrides"
|
||||
@ -9026,6 +9050,14 @@ MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_SAVE_CURRENT_CONFIG_OVERRIDE_CORE,
|
||||
"Save an override configuration file which will apply for all content loaded with this core. Will take precedence over the main configuration."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_REMOVE_CURRENT_CONFIG_OVERRIDE_CORE,
|
||||
"Remove Core Overrides"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_REMOVE_CURRENT_CONFIG_OVERRIDE_CORE,
|
||||
"Delete the override configuration file which will apply for all content loaded with this core."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_SAVE_CURRENT_CONFIG_OVERRIDE_CONTENT_DIR,
|
||||
"Save Content Directory Overrides"
|
||||
@ -9034,6 +9066,14 @@ MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_SAVE_CURRENT_CONFIG_OVERRIDE_CONTENT_DIR,
|
||||
"Save an override configuration file which will apply for all content loaded from the same directory as the current file. Will take precedence over the main configuration."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_REMOVE_CURRENT_CONFIG_OVERRIDE_CONTENT_DIR,
|
||||
"Remove Content Directory Overrides"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_REMOVE_CURRENT_CONFIG_OVERRIDE_CONTENT_DIR,
|
||||
"Delete the override configuration file which will apply for all content loaded from the same directory as the current file."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_SAVE_CURRENT_CONFIG_OVERRIDE_GAME,
|
||||
"Save Game Overrides"
|
||||
@ -9042,6 +9082,22 @@ MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_SAVE_CURRENT_CONFIG_OVERRIDE_GAME,
|
||||
"Save an override configuration file which will apply for the current content only. Will take precedence over the main configuration."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_REMOVE_CURRENT_CONFIG_OVERRIDE_GAME,
|
||||
"Remove Game Overrides"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_REMOVE_CURRENT_CONFIG_OVERRIDE_GAME,
|
||||
"Delete the override configuration file which will apply for the current content only."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_OVERRIDE_UNLOAD,
|
||||
"Unload Override"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_OVERRIDE_UNLOAD,
|
||||
"Reset all options to global config values."
|
||||
)
|
||||
|
||||
/* Quick Menu > Achievements */
|
||||
|
||||
@ -13606,10 +13662,26 @@ MSG_HASH(
|
||||
MSG_OVERRIDES_ERROR_SAVING,
|
||||
"Error saving overrides."
|
||||
)
|
||||
MSG_HASH(
|
||||
MSG_OVERRIDES_ERROR_REMOVING,
|
||||
"Error removing overrides."
|
||||
)
|
||||
MSG_HASH(
|
||||
MSG_OVERRIDES_SAVED_SUCCESSFULLY,
|
||||
"Overrides saved successfully."
|
||||
)
|
||||
MSG_HASH(
|
||||
MSG_OVERRIDES_REMOVED_SUCCESSFULLY,
|
||||
"Overrides removed successfully."
|
||||
)
|
||||
MSG_HASH(
|
||||
MSG_OVERRIDES_UNLOADED_SUCCESSFULLY,
|
||||
"Overrides unloaded successfully."
|
||||
)
|
||||
MSG_HASH(
|
||||
MSG_OVERRIDES_NOT_SAVED,
|
||||
"Nothing to save. Overrides not saved."
|
||||
)
|
||||
MSG_HASH(
|
||||
MSG_PAUSED,
|
||||
"Paused."
|
||||
|
@ -145,6 +145,7 @@ GENERIC_DEFERRED_PUSH(deferred_push_audio_dsp_plugin, DISPLAYLIST_
|
||||
GENERIC_DEFERRED_PUSH(deferred_push_cheat_file_load, DISPLAYLIST_CHEAT_FILES)
|
||||
GENERIC_DEFERRED_PUSH(deferred_push_cheat_file_load_append, DISPLAYLIST_CHEAT_FILES)
|
||||
GENERIC_DEFERRED_PUSH(deferred_push_remap_file_load, DISPLAYLIST_REMAP_FILES)
|
||||
GENERIC_DEFERRED_PUSH(deferred_push_override_file_load, DISPLAYLIST_CONFIG_FILES)
|
||||
GENERIC_DEFERRED_PUSH(deferred_push_record_configfile, DISPLAYLIST_RECORD_CONFIG_FILES)
|
||||
GENERIC_DEFERRED_PUSH(deferred_push_stream_configfile, DISPLAYLIST_STREAM_CONFIG_FILES)
|
||||
GENERIC_DEFERRED_PUSH(deferred_push_input_overlay, DISPLAYLIST_OVERLAYS)
|
||||
@ -875,6 +876,7 @@ static int menu_cbs_init_bind_deferred_push_compare_label(
|
||||
{MENU_ENUM_LABEL_CHEAT_FILE_LOAD, deferred_push_cheat_file_load},
|
||||
{MENU_ENUM_LABEL_CHEAT_FILE_LOAD_APPEND, deferred_push_cheat_file_load_append},
|
||||
{MENU_ENUM_LABEL_REMAP_FILE_LOAD, deferred_push_remap_file_load},
|
||||
{MENU_ENUM_LABEL_OVERRIDE_FILE_LOAD, deferred_push_override_file_load},
|
||||
{MENU_ENUM_LABEL_RECORD_CONFIG, deferred_push_record_configfile},
|
||||
{MENU_ENUM_LABEL_STREAM_CONFIG, deferred_push_stream_configfile},
|
||||
{MENU_ENUM_LABEL_RGUI_MENU_THEME_PRESET, deferred_push_rgui_theme_preset},
|
||||
@ -1031,6 +1033,9 @@ static int menu_cbs_init_bind_deferred_push_compare_label(
|
||||
case MENU_ENUM_LABEL_REMAP_FILE_LOAD:
|
||||
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_remap_file_load);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_OVERRIDE_FILE_LOAD:
|
||||
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_override_file_load);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_RECORD_CONFIG:
|
||||
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_record_configfile);
|
||||
break;
|
||||
|
@ -164,6 +164,31 @@ static void menu_action_setting_disp_set_label_remap_file_info(
|
||||
strlcpy(s2, path, len2);
|
||||
}
|
||||
|
||||
static void menu_action_setting_disp_set_label_override_file_info(
|
||||
file_list_t* list,
|
||||
unsigned *w, unsigned type, unsigned i,
|
||||
const char *label,
|
||||
char *s, size_t len,
|
||||
const char *path,
|
||||
char *s2, size_t len2)
|
||||
{
|
||||
runloop_state_t *runloop_st = runloop_state_get_ptr();
|
||||
const char *override_path = path_get(RARCH_PATH_CONFIG_OVERRIDE);
|
||||
const char *override_file = NULL;
|
||||
|
||||
*w = 19;
|
||||
|
||||
if (!string_is_empty(override_path))
|
||||
override_file = path_basename_nocompression(override_path);
|
||||
|
||||
if (!string_is_empty(override_file))
|
||||
strlcpy(s, override_file, len);
|
||||
else
|
||||
strlcpy(s, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NOT_AVAILABLE), len);
|
||||
|
||||
strlcpy(s2, path, len2);
|
||||
}
|
||||
|
||||
static void menu_action_setting_disp_set_label_configurations(
|
||||
file_list_t* list,
|
||||
unsigned *w, unsigned type, unsigned i,
|
||||
@ -1878,6 +1903,10 @@ static int menu_cbs_init_bind_get_string_representation_compare_label(
|
||||
BIND_ACTION_GET_VALUE(cbs,
|
||||
menu_action_setting_disp_set_label_remap_file_info);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_OVERRIDE_FILE_INFO:
|
||||
BIND_ACTION_GET_VALUE(cbs,
|
||||
menu_action_setting_disp_set_label_override_file_info);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_VIDEO_SHADER_FILTER_PASS:
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
BIND_ACTION_GET_VALUE(cbs,
|
||||
|
@ -115,6 +115,7 @@ enum
|
||||
ACTION_OK_LOAD_STREAM_CONFIGFILE,
|
||||
ACTION_OK_LOAD_RECORD_CONFIGFILE,
|
||||
ACTION_OK_LOAD_REMAPPING_FILE,
|
||||
ACTION_OK_LOAD_OVERRIDE_FILE,
|
||||
ACTION_OK_LOAD_CHEAT_FILE,
|
||||
ACTION_OK_SUBSYSTEM_ADD,
|
||||
ACTION_OK_LOAD_CONFIG_FILE,
|
||||
@ -1166,6 +1167,28 @@ int generic_action_ok_displaylist_push(const char *path,
|
||||
dl_type = DISPLAYLIST_FILE_BROWSER_SELECT_FILE;
|
||||
}
|
||||
break;
|
||||
case ACTION_OK_DL_OVERRIDE_FILE:
|
||||
{
|
||||
struct retro_system_info *system = &runloop_state_get_ptr()->system.info;
|
||||
const char *core_name = system ? system->library_name : NULL;
|
||||
|
||||
if (!string_is_empty(core_name))
|
||||
{
|
||||
fill_pathname_join_special(tmp,
|
||||
settings->paths.directory_menu_config,
|
||||
core_name, sizeof(tmp));
|
||||
if (!path_is_directory(tmp))
|
||||
tmp[0] = '\0';
|
||||
}
|
||||
|
||||
filebrowser_clear_type();
|
||||
info.type = type;
|
||||
info.directory_ptr = idx;
|
||||
info_path = !string_is_empty(tmp) ? tmp : settings->paths.directory_menu_config;
|
||||
info_label = label;
|
||||
dl_type = DISPLAYLIST_FILE_BROWSER_SELECT_FILE;
|
||||
}
|
||||
break;
|
||||
case ACTION_OK_DL_STREAM_CONFIGFILE:
|
||||
{
|
||||
info.type = type;
|
||||
@ -2168,6 +2191,15 @@ static int generic_action_ok(const char *path,
|
||||
conf = NULL;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
case ACTION_OK_LOAD_OVERRIDE_FILE:
|
||||
#ifdef HAVE_CONFIGFILE
|
||||
flush_char = msg_hash_to_str(flush_id);
|
||||
config_unload_override();
|
||||
|
||||
if (!config_load_override_file(action_path))
|
||||
return -1;
|
||||
#endif
|
||||
break;
|
||||
case ACTION_OK_LOAD_CHEAT_FILE:
|
||||
@ -2316,6 +2348,7 @@ DEFAULT_ACTION_OK_SET(action_ok_cheat_file_load_append, ACTION_OK_LOAD_CHEA
|
||||
DEFAULT_ACTION_OK_SET(action_ok_record_configfile_load, ACTION_OK_LOAD_RECORD_CONFIGFILE, MENU_ENUM_LABEL_RECORDING_SETTINGS)
|
||||
DEFAULT_ACTION_OK_SET(action_ok_stream_configfile_load, ACTION_OK_LOAD_STREAM_CONFIGFILE, MENU_ENUM_LABEL_RECORDING_SETTINGS)
|
||||
DEFAULT_ACTION_OK_SET(action_ok_remap_file_load, ACTION_OK_LOAD_REMAPPING_FILE, MENU_ENUM_LABEL_DEFERRED_REMAP_FILE_MANAGER_LIST)
|
||||
DEFAULT_ACTION_OK_SET(action_ok_override_file_load, ACTION_OK_LOAD_OVERRIDE_FILE, MENU_ENUM_LABEL_DEFERRED_QUICK_MENU_OVERRIDE_OPTIONS)
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
DEFAULT_ACTION_OK_SET(action_ok_shader_preset_load, ACTION_OK_LOAD_PRESET, MENU_ENUM_LABEL_SHADER_OPTIONS)
|
||||
DEFAULT_ACTION_OK_SET(action_ok_shader_pass_load, ACTION_OK_LOAD_SHADER_PASS, MENU_ENUM_LABEL_SHADER_OPTIONS)
|
||||
@ -3739,6 +3772,18 @@ static int action_ok_remap_file_flush(const char *path,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int action_ok_override_unload(const char *path,
|
||||
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
||||
{
|
||||
if (!config_unload_override())
|
||||
return 0;
|
||||
runloop_msg_queue_push(
|
||||
msg_hash_to_str(MSG_OVERRIDES_UNLOADED_SUCCESSFULLY),
|
||||
1, 100, true,
|
||||
NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int action_ok_path_use_directory(const char *path,
|
||||
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
||||
{
|
||||
@ -5887,6 +5932,7 @@ DEFAULT_ACTION_OK_FUNC(action_ok_subsystem_add_load, ACTION_OK_DL_SUBSYSTEM_LOAD
|
||||
DEFAULT_ACTION_OK_FUNC(action_ok_record_configfile, ACTION_OK_DL_RECORD_CONFIGFILE)
|
||||
DEFAULT_ACTION_OK_FUNC(action_ok_stream_configfile, ACTION_OK_DL_STREAM_CONFIGFILE)
|
||||
DEFAULT_ACTION_OK_FUNC(action_ok_remap_file, ACTION_OK_DL_REMAP_FILE)
|
||||
DEFAULT_ACTION_OK_FUNC(action_ok_override_file, ACTION_OK_DL_OVERRIDE_FILE)
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
DEFAULT_ACTION_OK_FUNC(action_ok_shader_preset, ACTION_OK_DL_SHADER_PRESET)
|
||||
DEFAULT_ACTION_OK_FUNC(action_ok_shader_preset_prepend, ACTION_OK_DL_SHADER_PRESET_PREPEND)
|
||||
@ -8257,7 +8303,6 @@ static int menu_cbs_init_bind_ok_compare_label(menu_file_list_cbs_t *cbs,
|
||||
#if defined(HAVE_VIDEO_LAYOUT)
|
||||
{MENU_ENUM_LABEL_VIDEO_LAYOUT_PATH, action_ok_video_layout},
|
||||
#endif
|
||||
{MENU_ENUM_LABEL_REMAP_FILE_LOAD, action_ok_remap_file},
|
||||
{MENU_ENUM_LABEL_RECORD_CONFIG, action_ok_record_configfile},
|
||||
{MENU_ENUM_LABEL_STREAM_CONFIG, action_ok_stream_configfile},
|
||||
#ifdef HAVE_RGUI
|
||||
@ -8379,6 +8424,7 @@ static int menu_cbs_init_bind_ok_compare_label(menu_file_list_cbs_t *cbs,
|
||||
{MENU_ENUM_LABEL_CHEAT_APPLY_CHANGES, action_ok_cheat_apply_changes},
|
||||
{MENU_ENUM_LABEL_CHEAT_FILE_SAVE_AS, action_ok_cheat_file_save_as},
|
||||
#endif
|
||||
{MENU_ENUM_LABEL_REMAP_FILE_LOAD, action_ok_remap_file},
|
||||
{MENU_ENUM_LABEL_REMAP_FILE_SAVE_CORE, action_ok_remap_file_save_core},
|
||||
{MENU_ENUM_LABEL_REMAP_FILE_SAVE_CONTENT_DIR, action_ok_remap_file_save_content_dir},
|
||||
{MENU_ENUM_LABEL_REMAP_FILE_SAVE_GAME, action_ok_remap_file_save_game},
|
||||
@ -8387,6 +8433,8 @@ static int menu_cbs_init_bind_ok_compare_label(menu_file_list_cbs_t *cbs,
|
||||
{MENU_ENUM_LABEL_REMAP_FILE_REMOVE_GAME, action_ok_remap_file_remove_game},
|
||||
{MENU_ENUM_LABEL_REMAP_FILE_RESET, action_ok_remap_file_reset},
|
||||
{MENU_ENUM_LABEL_REMAP_FILE_FLUSH, action_ok_remap_file_flush},
|
||||
{MENU_ENUM_LABEL_OVERRIDE_FILE_LOAD, action_ok_override_file},
|
||||
{MENU_ENUM_LABEL_OVERRIDE_UNLOAD, action_ok_override_unload},
|
||||
{MENU_ENUM_LABEL_PLAYLISTS_TAB, action_ok_content_collection_list},
|
||||
{MENU_ENUM_LABEL_BROWSE_URL_LIST, action_ok_browse_url_list},
|
||||
{MENU_ENUM_LABEL_CORE_LIST, action_ok_core_list},
|
||||
@ -8493,6 +8541,7 @@ static int menu_cbs_init_bind_ok_compare_label(menu_file_list_cbs_t *cbs,
|
||||
{MENU_ENUM_LABEL_VIDEO_LAYOUT_PATH, action_ok_video_layout},
|
||||
#endif
|
||||
{MENU_ENUM_LABEL_REMAP_FILE_LOAD, action_ok_remap_file},
|
||||
{MENU_ENUM_LABEL_OVERRIDE_FILE_LOAD, action_ok_override_file},
|
||||
{MENU_ENUM_LABEL_RECORD_CONFIG, action_ok_record_configfile},
|
||||
{MENU_ENUM_LABEL_STREAM_CONFIG, action_ok_stream_configfile},
|
||||
{MENU_ENUM_LABEL_RGUI_MENU_THEME_PRESET, action_ok_rgui_menu_theme_preset},
|
||||
@ -8785,6 +8834,11 @@ static int menu_cbs_init_bind_ok_compare_type(menu_file_list_cbs_t *cbs,
|
||||
BIND_ACTION_OK(cbs, action_ok_set_manual_content_scan_dat_file);
|
||||
break;
|
||||
case FILE_TYPE_CONFIG:
|
||||
if (string_is_equal(menu_label, msg_hash_to_str(MENU_ENUM_LABEL_OVERRIDE_FILE_LOAD)))
|
||||
{
|
||||
BIND_ACTION_OK(cbs, action_ok_override_file_load);
|
||||
break;
|
||||
}
|
||||
BIND_ACTION_OK(cbs, action_ok_config_load);
|
||||
break;
|
||||
case FILE_TYPE_PARENT_DIRECTORY:
|
||||
|
@ -103,6 +103,22 @@ static int action_start_remap_file_info(
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int action_start_override_file_info(
|
||||
const char *path, const char *label,
|
||||
unsigned type, size_t idx, size_t entry_idx)
|
||||
{
|
||||
rarch_system_info_t *system = &runloop_state_get_ptr()->system;
|
||||
bool refresh = false;
|
||||
|
||||
config_load_override(system);
|
||||
|
||||
/* Refresh menu */
|
||||
menu_entries_ctl(MENU_ENTRIES_CTL_SET_REFRESH, &refresh);
|
||||
menu_driver_ctl(RARCH_MENU_CTL_SET_PREVENT_POPULATE, NULL);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int action_start_shader_preset(
|
||||
const char *path, const char *label,
|
||||
unsigned type, size_t idx, size_t entry_idx)
|
||||
@ -795,6 +811,9 @@ static int menu_cbs_init_bind_start_compare_label(menu_file_list_cbs_t *cbs)
|
||||
case MENU_ENUM_LABEL_REMAP_FILE_INFO:
|
||||
BIND_ACTION_START(cbs, action_start_remap_file_info);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_OVERRIDE_FILE_INFO:
|
||||
BIND_ACTION_START(cbs, action_start_override_file_info);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_VIDEO_FILTER:
|
||||
BIND_ACTION_START(cbs, action_start_video_filter_file_load);
|
||||
break;
|
||||
|
@ -906,12 +906,21 @@ DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_save_current_config_override_core,
|
||||
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_save_current_config_override_content_dir,
|
||||
MENU_ENUM_SUBLABEL_SAVE_CURRENT_CONFIG_OVERRIDE_CONTENT_DIR)
|
||||
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_save_current_config_override_game, MENU_ENUM_SUBLABEL_SAVE_CURRENT_CONFIG_OVERRIDE_GAME)
|
||||
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_remove_current_config_override_core, MENU_ENUM_SUBLABEL_REMOVE_CURRENT_CONFIG_OVERRIDE_CORE)
|
||||
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_remove_current_config_override_content_dir,
|
||||
MENU_ENUM_SUBLABEL_REMOVE_CURRENT_CONFIG_OVERRIDE_CONTENT_DIR)
|
||||
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_remove_current_config_override_game, MENU_ENUM_SUBLABEL_REMOVE_CURRENT_CONFIG_OVERRIDE_GAME)
|
||||
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_shader_options, MENU_ENUM_SUBLABEL_SHADER_OPTIONS)
|
||||
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_core_input_remapping_options, MENU_ENUM_SUBLABEL_CORE_INPUT_REMAPPING_OPTIONS)
|
||||
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_remap_file_manager_list, MENU_ENUM_SUBLABEL_REMAP_FILE_MANAGER_LIST)
|
||||
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_remap_file_info, MENU_ENUM_SUBLABEL_REMAP_FILE_INFO)
|
||||
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_remap_file_reset, MENU_ENUM_SUBLABEL_REMAP_FILE_RESET)
|
||||
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_remap_file_flush, MENU_ENUM_SUBLABEL_REMAP_FILE_FLUSH)
|
||||
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_override_file_info, MENU_ENUM_SUBLABEL_OVERRIDE_FILE_INFO)
|
||||
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_override_file_load, MENU_ENUM_SUBLABEL_OVERRIDE_FILE_LOAD)
|
||||
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_override_unload, MENU_ENUM_SUBLABEL_OVERRIDE_UNLOAD)
|
||||
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_core_option_override_list, MENU_ENUM_SUBLABEL_CORE_OPTION_OVERRIDE_LIST)
|
||||
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_core_option_override_info, MENU_ENUM_SUBLABEL_CORE_OPTION_OVERRIDE_INFO)
|
||||
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_core_options_reset, MENU_ENUM_SUBLABEL_CORE_OPTIONS_RESET)
|
||||
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_core_options_flush, MENU_ENUM_SUBLABEL_CORE_OPTIONS_FLUSH)
|
||||
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_show_advanced_settings, MENU_ENUM_SUBLABEL_SHOW_ADVANCED_SETTINGS)
|
||||
@ -3132,6 +3141,9 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs,
|
||||
case MENU_ENUM_LABEL_CORE_OPTION_OVERRIDE_LIST:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_core_option_override_list);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_CORE_OPTION_OVERRIDE_INFO:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_core_option_override_info);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_CORE_OPTIONS_RESET:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_core_options_reset);
|
||||
break;
|
||||
@ -3144,12 +3156,24 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs,
|
||||
case MENU_ENUM_LABEL_REMAP_FILE_MANAGER_LIST:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_remap_file_manager_list);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_REMAP_FILE_INFO:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_remap_file_info);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_REMAP_FILE_RESET:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_remap_file_reset);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_REMAP_FILE_FLUSH:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_remap_file_flush);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_OVERRIDE_FILE_INFO:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_override_file_info);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_OVERRIDE_FILE_LOAD:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_override_file_load);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_OVERRIDE_UNLOAD:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_override_unload);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_CORE_CHEAT_OPTIONS:
|
||||
#ifdef HAVE_CHEATS
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_core_cheat_options);
|
||||
@ -3179,6 +3203,15 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs,
|
||||
case MENU_ENUM_LABEL_SAVE_CURRENT_CONFIG_OVERRIDE_CONTENT_DIR:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_save_current_config_override_content_dir);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_REMOVE_CURRENT_CONFIG_OVERRIDE_GAME:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_remove_current_config_override_game);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_REMOVE_CURRENT_CONFIG_OVERRIDE_CORE:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_remove_current_config_override_core);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_REMOVE_CURRENT_CONFIG_OVERRIDE_CONTENT_DIR:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_remove_current_config_override_content_dir);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_RESTART_CONTENT:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_restart_content);
|
||||
break;
|
||||
|
@ -713,6 +713,7 @@ DEFAULT_TITLE_MACRO(action_get_title_dropdown_disk_index, MENU_ENUM_LABEL_VALUE_
|
||||
|
||||
DEFAULT_FILL_TITLE_MACRO(action_get_title_disk_image_append, MENU_ENUM_LABEL_VALUE_DISK_IMAGE_APPEND)
|
||||
DEFAULT_FILL_TITLE_MACRO(action_get_title_remap_file_load, MENU_ENUM_LABEL_VALUE_REMAP_FILE)
|
||||
DEFAULT_FILL_TITLE_MACRO(action_get_title_override_file_load, MENU_ENUM_LABEL_VALUE_OVERRIDE_FILE_LOAD)
|
||||
DEFAULT_FILL_TITLE_MACRO(action_get_title_video_filter, MENU_ENUM_LABEL_VALUE_VIDEO_FILTER)
|
||||
DEFAULT_FILL_TITLE_MACRO(action_get_title_cheat_directory, MENU_ENUM_LABEL_VALUE_CHEAT_DATABASE_PATH)
|
||||
DEFAULT_FILL_TITLE_MACRO(action_get_title_core_directory, MENU_ENUM_LABEL_VALUE_LIBRETRO_DIR_PATH)
|
||||
@ -1273,6 +1274,8 @@ static int menu_cbs_init_bind_title_compare_label(menu_file_list_cbs_t *cbs,
|
||||
action_get_title_cheat_file_load_append},
|
||||
{MENU_ENUM_LABEL_REMAP_FILE_LOAD,
|
||||
action_get_title_remap_file_load},
|
||||
{MENU_ENUM_LABEL_OVERRIDE_FILE_LOAD,
|
||||
action_get_title_override_file_load},
|
||||
{MENU_ENUM_LABEL_DEFERRED_ACCOUNTS_CHEEVOS_LIST,
|
||||
action_get_user_accounts_cheevos_list},
|
||||
{MENU_ENUM_LABEL_DEFERRED_CORE_CONTENT_LIST,
|
||||
@ -1683,6 +1686,9 @@ static int menu_cbs_init_bind_title_compare_label(menu_file_list_cbs_t *cbs,
|
||||
case MENU_ENUM_LABEL_REMAP_FILE_LOAD:
|
||||
BIND_ACTION_GET_TITLE(cbs, action_get_title_remap_file_load);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_OVERRIDE_FILE_LOAD:
|
||||
BIND_ACTION_GET_TITLE(cbs, action_get_title_override_file_load);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_DEFERRED_ACCOUNTS_CHEEVOS_LIST:
|
||||
BIND_ACTION_GET_TITLE(cbs, action_get_user_accounts_cheevos_list);
|
||||
break;
|
||||
|
@ -10662,7 +10662,10 @@ static void materialui_list_insert(
|
||||
node->icon_texture_index = MUI_TEXTURE_UNDO_LOAD_STATE;
|
||||
node->icon_type = MUI_ICON_TYPE_INTERNAL;
|
||||
}
|
||||
else if (string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_UNDO_SAVE_STATE)))
|
||||
else if (
|
||||
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_UNDO_SAVE_STATE)) ||
|
||||
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_OVERRIDE_UNLOAD))
|
||||
)
|
||||
{
|
||||
node->icon_texture_index = MUI_TEXTURE_UNDO_SAVE_STATE;
|
||||
node->icon_type = MUI_ICON_TYPE_INTERNAL;
|
||||
@ -10700,6 +10703,9 @@ static void materialui_list_insert(
|
||||
else if (
|
||||
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_DELETE_ENTRY)) ||
|
||||
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_DELETE_PLAYLIST)) ||
|
||||
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_REMOVE_CURRENT_CONFIG_OVERRIDE_CORE)) ||
|
||||
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_REMOVE_CURRENT_CONFIG_OVERRIDE_CONTENT_DIR)) ||
|
||||
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_REMOVE_CURRENT_CONFIG_OVERRIDE_GAME)) ||
|
||||
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_VIDEO_SHADER_PRESET_REMOVE))
|
||||
)
|
||||
{
|
||||
@ -10847,6 +10853,7 @@ static void materialui_list_insert(
|
||||
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_REMAP_FILE_SAVE_CORE)) ||
|
||||
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_REMAP_FILE_SAVE_CONTENT_DIR)) ||
|
||||
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_REMAP_FILE_SAVE_GAME)) ||
|
||||
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_OVERRIDE_FILE_LOAD)) ||
|
||||
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_INPUT_META_CHEAT_SEARCH)) ||
|
||||
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_CHEAT_SEARCH_SETTINGS)) ||
|
||||
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_CHEAT_START_OR_CONT)) ||
|
||||
|
@ -1798,6 +1798,9 @@ static uintptr_t ozone_entries_icon_get_texture(
|
||||
case MENU_ENUM_LABEL_REMAP_FILE_SAVE_CORE:
|
||||
case MENU_ENUM_LABEL_REMAP_FILE_SAVE_CONTENT_DIR:
|
||||
case MENU_ENUM_LABEL_REMAP_FILE_SAVE_GAME:
|
||||
case MENU_ENUM_LABEL_SAVE_CURRENT_CONFIG_OVERRIDE_CORE:
|
||||
case MENU_ENUM_LABEL_SAVE_CURRENT_CONFIG_OVERRIDE_CONTENT_DIR:
|
||||
case MENU_ENUM_LABEL_SAVE_CURRENT_CONFIG_OVERRIDE_GAME:
|
||||
case MENU_ENUM_LABEL_NETWORK_ON_DEMAND_THUMBNAILS:
|
||||
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_SAVESTATE];
|
||||
case MENU_ENUM_LABEL_LOAD_STATE:
|
||||
@ -1846,7 +1849,6 @@ static uintptr_t ozone_entries_icon_get_texture(
|
||||
/* Menu icons */
|
||||
case MENU_ENUM_LABEL_CONTENT_SETTINGS:
|
||||
case MENU_ENUM_LABEL_UPDATE_ASSETS:
|
||||
case MENU_ENUM_LABEL_SAVE_CURRENT_CONFIG_OVERRIDE_GAME:
|
||||
case MENU_ENUM_LABEL_VIDEO_SHADER_PRESET_SAVE_GLOBAL:
|
||||
case MENU_ENUM_LABEL_VIDEO_SHADER_PRESET_SAVE_GAME:
|
||||
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_QUICKMENU];
|
||||
@ -1861,7 +1863,6 @@ static uintptr_t ozone_entries_icon_get_texture(
|
||||
case MENU_ENUM_LABEL_UPDATE_INSTALLED_CORES:
|
||||
case MENU_ENUM_LABEL_SWITCH_INSTALLED_CORES_PFD:
|
||||
case MENU_ENUM_LABEL_VIDEO_SHADER_PRESET_SAVE_CORE:
|
||||
case MENU_ENUM_LABEL_SAVE_CURRENT_CONFIG_OVERRIDE_CORE:
|
||||
case MENU_ENUM_LABEL_SET_CORE_ASSOCIATION:
|
||||
case MENU_ENUM_LABEL_QUICK_MENU_SHOW_SET_CORE_ASSOCIATION:
|
||||
case MENU_ENUM_LABEL_CORE_INFORMATION:
|
||||
@ -2023,9 +2024,13 @@ static uintptr_t ozone_entries_icon_get_texture(
|
||||
case MENU_ENUM_LABEL_REMAP_FILE_REMOVE_CORE:
|
||||
case MENU_ENUM_LABEL_REMAP_FILE_REMOVE_CONTENT_DIR:
|
||||
case MENU_ENUM_LABEL_REMAP_FILE_REMOVE_GAME:
|
||||
case MENU_ENUM_LABEL_REMOVE_CURRENT_CONFIG_OVERRIDE_CORE:
|
||||
case MENU_ENUM_LABEL_REMOVE_CURRENT_CONFIG_OVERRIDE_CONTENT_DIR:
|
||||
case MENU_ENUM_LABEL_REMOVE_CURRENT_CONFIG_OVERRIDE_GAME:
|
||||
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_CLOSE];
|
||||
case MENU_ENUM_LABEL_CORE_OPTIONS_RESET:
|
||||
case MENU_ENUM_LABEL_REMAP_FILE_RESET:
|
||||
case MENU_ENUM_LABEL_OVERRIDE_UNLOAD:
|
||||
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_UNDO];
|
||||
case MENU_ENUM_LABEL_CORE_OPTIONS_FLUSH:
|
||||
case MENU_ENUM_LABEL_REMAP_FILE_FLUSH:
|
||||
@ -2078,7 +2083,6 @@ static uintptr_t ozone_entries_icon_get_texture(
|
||||
case MENU_ENUM_LABEL_ADD_CONTENT_LIST:
|
||||
case MENU_ENUM_LABEL_SCAN_DIRECTORY:
|
||||
case MENU_ENUM_LABEL_MANUAL_CONTENT_SCAN_LIST:
|
||||
case MENU_ENUM_LABEL_SAVE_CURRENT_CONFIG_OVERRIDE_CONTENT_DIR:
|
||||
case MENU_ENUM_LABEL_VIDEO_SHADER_PRESET_SAVE_PARENT:
|
||||
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_FOLDER];
|
||||
case MENU_ENUM_LABEL_PRIVACY_SETTINGS:
|
||||
@ -2127,6 +2131,7 @@ static uintptr_t ozone_entries_icon_get_texture(
|
||||
case MENU_ENUM_LABEL_CONFIGURATIONS:
|
||||
case MENU_ENUM_LABEL_GAME_SPECIFIC_OPTIONS:
|
||||
case MENU_ENUM_LABEL_REMAP_FILE_LOAD:
|
||||
case MENU_ENUM_LABEL_OVERRIDE_FILE_LOAD:
|
||||
case MENU_ENUM_LABEL_AUTO_OVERRIDES_ENABLE:
|
||||
case MENU_ENUM_LABEL_AUTO_REMAPS_ENABLE:
|
||||
case MENU_ENUM_LABEL_VIDEO_SHADER_PRESET:
|
||||
|
@ -2905,12 +2905,16 @@ static uintptr_t xmb_icon_get_id(xmb_handle_t *xmb,
|
||||
case MENU_ENUM_LABEL_REMAP_FILE_SAVE_CORE:
|
||||
case MENU_ENUM_LABEL_REMAP_FILE_SAVE_CONTENT_DIR:
|
||||
case MENU_ENUM_LABEL_REMAP_FILE_SAVE_GAME:
|
||||
case MENU_ENUM_LABEL_SAVE_CURRENT_CONFIG_OVERRIDE_CORE:
|
||||
case MENU_ENUM_LABEL_SAVE_CURRENT_CONFIG_OVERRIDE_CONTENT_DIR:
|
||||
case MENU_ENUM_LABEL_SAVE_CURRENT_CONFIG_OVERRIDE_GAME:
|
||||
case MENU_ENUM_LABEL_NETWORK_ON_DEMAND_THUMBNAILS:
|
||||
return xmb->textures.list[XMB_TEXTURE_SAVESTATE];
|
||||
case MENU_ENUM_LABEL_LOAD_STATE:
|
||||
case MENU_ENUM_LABEL_CONFIGURATIONS:
|
||||
case MENU_ENUM_LABEL_GAME_SPECIFIC_OPTIONS:
|
||||
case MENU_ENUM_LABEL_REMAP_FILE_LOAD:
|
||||
case MENU_ENUM_LABEL_OVERRIDE_FILE_LOAD:
|
||||
case MENU_ENUM_LABEL_AUTO_OVERRIDES_ENABLE:
|
||||
case MENU_ENUM_LABEL_AUTO_REMAPS_ENABLE:
|
||||
case MENU_ENUM_LABEL_VIDEO_SHADER_PRESET:
|
||||
@ -2952,7 +2956,6 @@ static uintptr_t xmb_icon_get_id(xmb_handle_t *xmb,
|
||||
case MENU_ENUM_LABEL_SETTINGS_SHOW_DIRECTORY:
|
||||
case MENU_ENUM_LABEL_SCAN_DIRECTORY:
|
||||
case MENU_ENUM_LABEL_MANUAL_CONTENT_SCAN_LIST:
|
||||
case MENU_ENUM_LABEL_SAVE_CURRENT_CONFIG_OVERRIDE_CONTENT_DIR:
|
||||
case MENU_ENUM_LABEL_VIDEO_SHADER_PRESET_SAVE_PARENT:
|
||||
case MENU_ENUM_LABEL_FAVORITES: /* "Start Directory" */
|
||||
case MENU_ENUM_LABEL_DOWNLOADED_FILE_DETECT_CORE_LIST:
|
||||
@ -2991,7 +2994,6 @@ static uintptr_t xmb_icon_get_id(xmb_handle_t *xmb,
|
||||
return xmb->textures.list[XMB_TEXTURE_DISC];
|
||||
case MENU_ENUM_LABEL_CONTENT_SETTINGS:
|
||||
case MENU_ENUM_LABEL_UPDATE_ASSETS:
|
||||
case MENU_ENUM_LABEL_SAVE_CURRENT_CONFIG_OVERRIDE_GAME:
|
||||
case MENU_ENUM_LABEL_VIDEO_SHADER_PRESET_SAVE_GLOBAL:
|
||||
case MENU_ENUM_LABEL_VIDEO_SHADER_PRESET_SAVE_GAME:
|
||||
return xmb->textures.list[XMB_TEXTURE_QUICKMENU];
|
||||
@ -3006,7 +3008,6 @@ static uintptr_t xmb_icon_get_id(xmb_handle_t *xmb,
|
||||
case MENU_ENUM_LABEL_UPDATE_INSTALLED_CORES:
|
||||
case MENU_ENUM_LABEL_SWITCH_INSTALLED_CORES_PFD:
|
||||
case MENU_ENUM_LABEL_VIDEO_SHADER_PRESET_SAVE_CORE:
|
||||
case MENU_ENUM_LABEL_SAVE_CURRENT_CONFIG_OVERRIDE_CORE:
|
||||
case MENU_ENUM_LABEL_SET_CORE_ASSOCIATION:
|
||||
case MENU_ENUM_LABEL_QUICK_MENU_SHOW_SET_CORE_ASSOCIATION:
|
||||
case MENU_ENUM_LABEL_CORE_INFORMATION:
|
||||
@ -3157,9 +3158,13 @@ static uintptr_t xmb_icon_get_id(xmb_handle_t *xmb,
|
||||
case MENU_ENUM_LABEL_REMAP_FILE_REMOVE_CORE:
|
||||
case MENU_ENUM_LABEL_REMAP_FILE_REMOVE_CONTENT_DIR:
|
||||
case MENU_ENUM_LABEL_REMAP_FILE_REMOVE_GAME:
|
||||
case MENU_ENUM_LABEL_REMOVE_CURRENT_CONFIG_OVERRIDE_CORE:
|
||||
case MENU_ENUM_LABEL_REMOVE_CURRENT_CONFIG_OVERRIDE_CONTENT_DIR:
|
||||
case MENU_ENUM_LABEL_REMOVE_CURRENT_CONFIG_OVERRIDE_GAME:
|
||||
return xmb->textures.list[XMB_TEXTURE_CLOSE];
|
||||
case MENU_ENUM_LABEL_CORE_OPTIONS_RESET:
|
||||
case MENU_ENUM_LABEL_REMAP_FILE_RESET:
|
||||
case MENU_ENUM_LABEL_OVERRIDE_UNLOAD:
|
||||
return xmb->textures.list[XMB_TEXTURE_UNDO];
|
||||
case MENU_ENUM_LABEL_CORE_OPTIONS_FLUSH:
|
||||
case MENU_ENUM_LABEL_REMAP_FILE_FLUSH:
|
||||
|
@ -140,6 +140,7 @@ enum
|
||||
ACTION_OK_DL_USER_BINDS_LIST,
|
||||
ACTION_OK_DL_CONTENT_LIST,
|
||||
ACTION_OK_DL_REMAP_FILE,
|
||||
ACTION_OK_DL_OVERRIDE_FILE,
|
||||
ACTION_OK_DL_RECORD_CONFIGFILE,
|
||||
ACTION_OK_DL_STREAM_CONFIGFILE,
|
||||
ACTION_OK_DL_DISK_IMAGE_APPEND_LIST,
|
||||
|
@ -13626,17 +13626,104 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
||||
case DISPLAYLIST_OPTIONS_OVERRIDES:
|
||||
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list);
|
||||
{
|
||||
bool has_content = !string_is_empty(path_get(RARCH_PATH_CONTENT));
|
||||
runloop_state_t *runloop_st = runloop_state_get_ptr();
|
||||
rarch_system_info_t *system = &runloop_st->system;
|
||||
|
||||
if (settings->bools.quick_menu_show_save_core_overrides
|
||||
const char *rarch_path_basename = path_get(RARCH_PATH_BASENAME);
|
||||
const char *rarch_path_override = path_get(RARCH_PATH_CONFIG_OVERRIDE);
|
||||
const char *core_name = system ? system->info.library_name : NULL;
|
||||
char config_directory[PATH_MAX_LENGTH];
|
||||
char content_dir_name[PATH_MAX_LENGTH];
|
||||
char override_path[PATH_MAX_LENGTH];
|
||||
bool has_content = !string_is_empty(path_get(RARCH_PATH_CONTENT));
|
||||
bool core_override_remove = false;
|
||||
bool content_dir_override_remove = false;
|
||||
bool game_override_remove = false;
|
||||
|
||||
config_directory[0] = '\0';
|
||||
content_dir_name[0] = '\0';
|
||||
override_path[0] = '\0';
|
||||
|
||||
if (!string_is_empty(rarch_path_override))
|
||||
{
|
||||
fill_pathname_application_special(config_directory,
|
||||
sizeof(config_directory),
|
||||
APPLICATION_SPECIAL_DIRECTORY_CONFIG);
|
||||
|
||||
if (has_content)
|
||||
{
|
||||
/* Game-specific path */
|
||||
fill_pathname_join_special_ext(override_path,
|
||||
config_directory, core_name,
|
||||
path_basename_nocompression(rarch_path_basename),
|
||||
FILE_PATH_CONFIG_EXTENSION,
|
||||
sizeof(override_path));
|
||||
|
||||
game_override_remove = path_is_valid(override_path);
|
||||
override_path[0] = '\0';
|
||||
|
||||
/* Contentdir-specific path */
|
||||
fill_pathname_parent_dir_name(content_dir_name,
|
||||
rarch_path_basename, sizeof(content_dir_name));
|
||||
fill_pathname_join_special_ext(override_path,
|
||||
config_directory, core_name,
|
||||
content_dir_name,
|
||||
FILE_PATH_CONFIG_EXTENSION,
|
||||
sizeof(override_path));
|
||||
|
||||
content_dir_override_remove = path_is_valid(override_path);
|
||||
override_path[0] = '\0';
|
||||
}
|
||||
|
||||
{
|
||||
/* Core-specific path */
|
||||
fill_pathname_join_special_ext(override_path,
|
||||
config_directory, core_name,
|
||||
core_name,
|
||||
FILE_PATH_CONFIG_EXTENSION,
|
||||
sizeof(override_path));
|
||||
|
||||
core_override_remove = path_is_valid(override_path);
|
||||
override_path[0] = '\0';
|
||||
}
|
||||
}
|
||||
|
||||
/* Show currently 'active' override file */
|
||||
if (menu_entries_append(info->list,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_OVERRIDE_FILE_INFO),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_OVERRIDE_FILE_INFO),
|
||||
MENU_ENUM_LABEL_OVERRIDE_FILE_INFO,
|
||||
MENU_SETTINGS_CORE_INFO_NONE, 0, 0, NULL))
|
||||
count++;
|
||||
|
||||
/* Load override file */
|
||||
if (menu_entries_append(info->list,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_OVERRIDE_FILE_LOAD),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_OVERRIDE_FILE_LOAD),
|
||||
MENU_ENUM_LABEL_OVERRIDE_FILE_LOAD,
|
||||
MENU_SETTING_ACTION, 0, 0, NULL))
|
||||
count++;
|
||||
|
||||
if ( has_content
|
||||
&& settings->bools.quick_menu_show_save_game_overrides
|
||||
&& !settings->bools.kiosk_mode_enable)
|
||||
{
|
||||
if (menu_entries_append(info->list,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_SAVE_CURRENT_CONFIG_OVERRIDE_CORE),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_SAVE_CURRENT_CONFIG_OVERRIDE_CORE),
|
||||
MENU_ENUM_LABEL_SAVE_CURRENT_CONFIG_OVERRIDE_CORE,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_SAVE_CURRENT_CONFIG_OVERRIDE_GAME),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_SAVE_CURRENT_CONFIG_OVERRIDE_GAME),
|
||||
MENU_ENUM_LABEL_SAVE_CURRENT_CONFIG_OVERRIDE_GAME,
|
||||
MENU_SETTING_ACTION, 0, 0, NULL))
|
||||
count++;
|
||||
|
||||
if (game_override_remove)
|
||||
{
|
||||
if (menu_entries_append(info->list,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_REMOVE_CURRENT_CONFIG_OVERRIDE_GAME),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_REMOVE_CURRENT_CONFIG_OVERRIDE_GAME),
|
||||
MENU_ENUM_LABEL_REMOVE_CURRENT_CONFIG_OVERRIDE_GAME,
|
||||
MENU_SETTING_ACTION, 0, 0, NULL))
|
||||
count++;
|
||||
}
|
||||
}
|
||||
|
||||
if ( has_content
|
||||
@ -13649,21 +13736,48 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
||||
MENU_ENUM_LABEL_SAVE_CURRENT_CONFIG_OVERRIDE_CONTENT_DIR,
|
||||
MENU_SETTING_ACTION, 0, 0, NULL))
|
||||
count++;
|
||||
}
|
||||
|
||||
if (has_content
|
||||
&& settings->bools.quick_menu_show_save_game_overrides
|
||||
&& !settings->bools.kiosk_mode_enable)
|
||||
if (content_dir_override_remove)
|
||||
{
|
||||
if (menu_entries_append(info->list,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_SAVE_CURRENT_CONFIG_OVERRIDE_GAME),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_SAVE_CURRENT_CONFIG_OVERRIDE_GAME),
|
||||
MENU_ENUM_LABEL_SAVE_CURRENT_CONFIG_OVERRIDE_GAME,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_REMOVE_CURRENT_CONFIG_OVERRIDE_CONTENT_DIR),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_REMOVE_CURRENT_CONFIG_OVERRIDE_CONTENT_DIR),
|
||||
MENU_ENUM_LABEL_REMOVE_CURRENT_CONFIG_OVERRIDE_CONTENT_DIR,
|
||||
MENU_SETTING_ACTION, 0, 0, NULL))
|
||||
count++;
|
||||
}
|
||||
}
|
||||
|
||||
if ( settings->bools.quick_menu_show_save_core_overrides
|
||||
&& !settings->bools.kiosk_mode_enable)
|
||||
{
|
||||
if (menu_entries_append(info->list,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_SAVE_CURRENT_CONFIG_OVERRIDE_CORE),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_SAVE_CURRENT_CONFIG_OVERRIDE_CORE),
|
||||
MENU_ENUM_LABEL_SAVE_CURRENT_CONFIG_OVERRIDE_CORE,
|
||||
MENU_SETTING_ACTION, 0, 0, NULL))
|
||||
count++;
|
||||
|
||||
if (core_override_remove)
|
||||
{
|
||||
if (menu_entries_append(info->list,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_REMOVE_CURRENT_CONFIG_OVERRIDE_CORE),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_REMOVE_CURRENT_CONFIG_OVERRIDE_CORE),
|
||||
MENU_ENUM_LABEL_REMOVE_CURRENT_CONFIG_OVERRIDE_CORE,
|
||||
MENU_SETTING_ACTION, 0, 0, NULL))
|
||||
count++;
|
||||
}
|
||||
}
|
||||
|
||||
/* Unload overrides */
|
||||
if (menu_entries_append(info->list,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_OVERRIDE_UNLOAD),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_OVERRIDE_UNLOAD),
|
||||
MENU_ENUM_LABEL_OVERRIDE_UNLOAD,
|
||||
MENU_SETTING_ACTION, 0, 0, NULL))
|
||||
count++;
|
||||
}
|
||||
|
||||
if (count == 0)
|
||||
menu_entries_append(info->list,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NO_SETTINGS_FOUND),
|
||||
|
@ -9872,6 +9872,36 @@ static bool setting_append_list(
|
||||
MENU_SETTINGS_LIST_CURRENT_ADD_CMD(list, list_info, CMD_EVENT_MENU_SAVE_CURRENT_CONFIG_OVERRIDE_GAME);
|
||||
SETTINGS_DATA_LIST_CURRENT_ADD_FLAGS(list, list_info, SD_FLAG_LAKKA_ADVANCED);
|
||||
|
||||
CONFIG_ACTION(
|
||||
list, list_info,
|
||||
MENU_ENUM_LABEL_REMOVE_CURRENT_CONFIG_OVERRIDE_CORE,
|
||||
MENU_ENUM_LABEL_VALUE_REMOVE_CURRENT_CONFIG_OVERRIDE_CORE,
|
||||
&group_info,
|
||||
&subgroup_info,
|
||||
parent_group);
|
||||
MENU_SETTINGS_LIST_CURRENT_ADD_CMD(list, list_info, CMD_EVENT_MENU_REMOVE_CURRENT_CONFIG_OVERRIDE_CORE);
|
||||
SETTINGS_DATA_LIST_CURRENT_ADD_FLAGS(list, list_info, SD_FLAG_LAKKA_ADVANCED);
|
||||
|
||||
CONFIG_ACTION(
|
||||
list, list_info,
|
||||
MENU_ENUM_LABEL_REMOVE_CURRENT_CONFIG_OVERRIDE_CONTENT_DIR,
|
||||
MENU_ENUM_LABEL_VALUE_REMOVE_CURRENT_CONFIG_OVERRIDE_CONTENT_DIR,
|
||||
&group_info,
|
||||
&subgroup_info,
|
||||
parent_group);
|
||||
MENU_SETTINGS_LIST_CURRENT_ADD_CMD(list, list_info, CMD_EVENT_MENU_REMOVE_CURRENT_CONFIG_OVERRIDE_CONTENT_DIR);
|
||||
SETTINGS_DATA_LIST_CURRENT_ADD_FLAGS(list, list_info, SD_FLAG_LAKKA_ADVANCED);
|
||||
|
||||
CONFIG_ACTION(
|
||||
list, list_info,
|
||||
MENU_ENUM_LABEL_REMOVE_CURRENT_CONFIG_OVERRIDE_GAME,
|
||||
MENU_ENUM_LABEL_VALUE_REMOVE_CURRENT_CONFIG_OVERRIDE_GAME,
|
||||
&group_info,
|
||||
&subgroup_info,
|
||||
parent_group);
|
||||
MENU_SETTINGS_LIST_CURRENT_ADD_CMD(list, list_info, CMD_EVENT_MENU_REMOVE_CURRENT_CONFIG_OVERRIDE_GAME);
|
||||
SETTINGS_DATA_LIST_CURRENT_ADD_FLAGS(list, list_info, SD_FLAG_LAKKA_ADVANCED);
|
||||
|
||||
CONFIG_ACTION(
|
||||
list, list_info,
|
||||
MENU_ENUM_LABEL_HELP_LIST,
|
||||
|
15
msg_hash.h
15
msg_hash.h
@ -337,10 +337,14 @@ enum msg_hash_enums
|
||||
MSG_LOADING_FAVORITES_FILE,
|
||||
MSG_COULD_NOT_READ_STATE_FROM_MOVIE,
|
||||
MSG_MOVIE_FILE_IS_NOT_A_VALID_BSV1_FILE,
|
||||
MSG_OVERRIDES_NOT_SAVED,
|
||||
MSG_OVERRIDES_SAVED_SUCCESSFULLY,
|
||||
MSG_OVERRIDES_REMOVED_SUCCESSFULLY,
|
||||
MSG_OVERRIDES_UNLOADED_SUCCESSFULLY,
|
||||
MSG_OVERRIDES_ERROR_SAVING,
|
||||
MSG_OVERRIDES_ERROR_REMOVING,
|
||||
MSG_AUTOCONFIG_FILE_SAVED_SUCCESSFULLY,
|
||||
MSG_AUTOCONFIG_FILE_ERROR_SAVING,
|
||||
MSG_OVERRIDES_ERROR_SAVING,
|
||||
MSG_FILE_ALREADY_EXISTS_SAVING_TO_BACKUP_BUFFER,
|
||||
MSG_AUTOLOADING_SAVESTATE_FROM,
|
||||
MSG_FOUND_AUTO_SAVESTATE_IN,
|
||||
@ -381,6 +385,7 @@ enum msg_hash_enums
|
||||
MSG_REMAP_FILE_SAVED_SUCCESSFULLY,
|
||||
MSG_REMAP_FILE_REMOVED_SUCCESSFULLY,
|
||||
MSG_REMAP_FILE_RESET,
|
||||
MSG_OVERRIDE_UNLOAD,
|
||||
MSG_SHADER_PRESET_SAVED_SUCCESSFULLY,
|
||||
MSG_SHADER_PRESET_REMOVED_SUCCESSFULLY,
|
||||
MSG_ERROR_SAVING_REMAP_FILE,
|
||||
@ -1769,6 +1774,7 @@ enum msg_hash_enums
|
||||
#endif
|
||||
MENU_ENUM_LABEL_DEFERRED_REMAP_FILE_MANAGER_LIST,
|
||||
MENU_ENUM_LABEL_DEFERRED_REMAPPINGS_PORT_LIST,
|
||||
MENU_ENUM_LABEL_DEFERRED_OVERRIDE_FILE_MANAGER_LIST,
|
||||
MENU_ENUM_LABEL_DEFERRED_DROPDOWN_BOX_LIST,
|
||||
MENU_ENUM_LABEL_DEFERRED_DROPDOWN_BOX_LIST_SPECIAL,
|
||||
MENU_ENUM_LABEL_DEFERRED_DROPDOWN_BOX_LIST_RESOLUTION,
|
||||
@ -3073,6 +3079,10 @@ enum msg_hash_enums
|
||||
MENU_LABEL(REMAP_FILE_RESET),
|
||||
MENU_LABEL(REMAP_FILE_FLUSH),
|
||||
|
||||
MENU_LABEL(OVERRIDE_FILE_INFO),
|
||||
MENU_LABEL(OVERRIDE_FILE_LOAD),
|
||||
MENU_LABEL(OVERRIDE_UNLOAD),
|
||||
|
||||
MENU_LABEL(RESTART_CONTENT),
|
||||
MENU_LABEL(RESUME),
|
||||
MENU_LABEL(RESUME_CONTENT),
|
||||
@ -3377,6 +3387,9 @@ enum msg_hash_enums
|
||||
MENU_LABEL(SAVE_CURRENT_CONFIG_OVERRIDE_CORE),
|
||||
MENU_LABEL(SAVE_CURRENT_CONFIG_OVERRIDE_CONTENT_DIR),
|
||||
MENU_LABEL(SAVE_CURRENT_CONFIG_OVERRIDE_GAME),
|
||||
MENU_LABEL(REMOVE_CURRENT_CONFIG_OVERRIDE_CORE),
|
||||
MENU_LABEL(REMOVE_CURRENT_CONFIG_OVERRIDE_CONTENT_DIR),
|
||||
MENU_LABEL(REMOVE_CURRENT_CONFIG_OVERRIDE_GAME),
|
||||
|
||||
MENU_ENUM_LABEL_VALUE_THUMBNAIL_MODE_BOXARTS,
|
||||
MENU_ENUM_LABEL_VALUE_THUMBNAIL_MODE_SCREENSHOTS,
|
||||
|
1
paths.h
1
paths.h
@ -51,6 +51,7 @@ enum rarch_path_type
|
||||
RARCH_PATH_CONFIG,
|
||||
RARCH_PATH_CONTENT,
|
||||
RARCH_PATH_CONFIG_APPEND,
|
||||
RARCH_PATH_CONFIG_OVERRIDE,
|
||||
RARCH_PATH_CORE_OPTIONS,
|
||||
RARCH_PATH_DEFAULT_SHADER_PRESET,
|
||||
RARCH_PATH_BASENAME,
|
||||
|
46
retroarch.c
46
retroarch.c
@ -314,6 +314,7 @@ struct rarch_state
|
||||
char path_libretro[PATH_MAX_LENGTH];
|
||||
char path_config_file[PATH_MAX_LENGTH];
|
||||
char path_config_append_file[PATH_MAX_LENGTH];
|
||||
char path_config_override_file[PATH_MAX_LENGTH];
|
||||
char path_core_options_file[PATH_MAX_LENGTH];
|
||||
char dir_system[PATH_MAX_LENGTH];
|
||||
char dir_savefile[PATH_MAX_LENGTH];
|
||||
@ -1594,6 +1595,10 @@ char *path_get_ptr(enum rarch_path_type type)
|
||||
if (!path_is_empty(RARCH_PATH_CONFIG_APPEND))
|
||||
return p_rarch->path_config_append_file;
|
||||
break;
|
||||
case RARCH_PATH_CONFIG_OVERRIDE:
|
||||
if (!path_is_empty(RARCH_PATH_CONFIG_OVERRIDE))
|
||||
return p_rarch->path_config_override_file;
|
||||
break;
|
||||
case RARCH_PATH_CORE:
|
||||
return p_rarch->path_libretro;
|
||||
case RARCH_PATH_NONE:
|
||||
@ -1631,6 +1636,10 @@ const char *path_get(enum rarch_path_type type)
|
||||
if (!path_is_empty(RARCH_PATH_CONFIG_APPEND))
|
||||
return p_rarch->path_config_append_file;
|
||||
break;
|
||||
case RARCH_PATH_CONFIG_OVERRIDE:
|
||||
if (!path_is_empty(RARCH_PATH_CONFIG_OVERRIDE))
|
||||
return p_rarch->path_config_override_file;
|
||||
break;
|
||||
case RARCH_PATH_CORE:
|
||||
return p_rarch->path_libretro;
|
||||
case RARCH_PATH_NONE:
|
||||
@ -1661,6 +1670,8 @@ size_t path_get_realsize(enum rarch_path_type type)
|
||||
return sizeof(p_rarch->path_config_file);
|
||||
case RARCH_PATH_CONFIG_APPEND:
|
||||
return sizeof(p_rarch->path_config_append_file);
|
||||
case RARCH_PATH_CONFIG_OVERRIDE:
|
||||
return sizeof(p_rarch->path_config_override_file);
|
||||
case RARCH_PATH_CORE:
|
||||
return sizeof(p_rarch->path_libretro);
|
||||
case RARCH_PATH_NONE:
|
||||
@ -1703,6 +1714,10 @@ bool path_set(enum rarch_path_type type, const char *path)
|
||||
strlcpy(p_rarch->path_config_file, path,
|
||||
sizeof(p_rarch->path_config_file));
|
||||
break;
|
||||
case RARCH_PATH_CONFIG_OVERRIDE:
|
||||
strlcpy(p_rarch->path_config_override_file, path,
|
||||
sizeof(p_rarch->path_config_override_file));
|
||||
break;
|
||||
case RARCH_PATH_CORE_OPTIONS:
|
||||
strlcpy(p_rarch->path_core_options_file, path,
|
||||
sizeof(p_rarch->path_core_options_file));
|
||||
@ -1742,14 +1757,18 @@ bool path_is_empty(enum rarch_path_type type)
|
||||
if (string_is_empty(p_rarch->path_config_file))
|
||||
return true;
|
||||
break;
|
||||
case RARCH_PATH_CORE_OPTIONS:
|
||||
if (string_is_empty(p_rarch->path_core_options_file))
|
||||
return true;
|
||||
break;
|
||||
case RARCH_PATH_CONFIG_APPEND:
|
||||
if (string_is_empty(p_rarch->path_config_append_file))
|
||||
return true;
|
||||
break;
|
||||
case RARCH_PATH_CONFIG_OVERRIDE:
|
||||
if (string_is_empty(p_rarch->path_config_override_file))
|
||||
return true;
|
||||
break;
|
||||
case RARCH_PATH_CORE_OPTIONS:
|
||||
if (string_is_empty(p_rarch->path_core_options_file))
|
||||
return true;
|
||||
break;
|
||||
case RARCH_PATH_CONTENT:
|
||||
if (string_is_empty(p_rarch->path_content))
|
||||
return true;
|
||||
@ -1799,6 +1818,9 @@ void path_clear(enum rarch_path_type type)
|
||||
case RARCH_PATH_CONFIG_APPEND:
|
||||
*p_rarch->path_config_append_file = '\0';
|
||||
break;
|
||||
case RARCH_PATH_CONFIG_OVERRIDE:
|
||||
*p_rarch->path_config_override_file = '\0';
|
||||
break;
|
||||
case RARCH_PATH_NONE:
|
||||
case RARCH_PATH_NAMES:
|
||||
break;
|
||||
@ -1818,6 +1840,7 @@ static void path_clear_all(void)
|
||||
path_clear(RARCH_PATH_CONTENT);
|
||||
path_clear(RARCH_PATH_CONFIG);
|
||||
path_clear(RARCH_PATH_CONFIG_APPEND);
|
||||
path_clear(RARCH_PATH_CONFIG_OVERRIDE);
|
||||
path_clear(RARCH_PATH_CORE_OPTIONS);
|
||||
path_clear(RARCH_PATH_BASENAME);
|
||||
}
|
||||
@ -3317,6 +3340,21 @@ bool command_event(enum event_command cmd, void *data)
|
||||
case CMD_EVENT_MENU_SAVE_CURRENT_CONFIG_OVERRIDE_GAME:
|
||||
#ifdef HAVE_CONFIGFILE
|
||||
command_event_save_current_config(OVERRIDE_GAME);
|
||||
#endif
|
||||
break;
|
||||
case CMD_EVENT_MENU_REMOVE_CURRENT_CONFIG_OVERRIDE_CORE:
|
||||
#ifdef HAVE_CONFIGFILE
|
||||
command_event_remove_current_config(OVERRIDE_CORE);
|
||||
#endif
|
||||
break;
|
||||
case CMD_EVENT_MENU_REMOVE_CURRENT_CONFIG_OVERRIDE_CONTENT_DIR:
|
||||
#ifdef HAVE_CONFIGFILE
|
||||
command_event_remove_current_config(OVERRIDE_CONTENT_DIR);
|
||||
#endif
|
||||
break;
|
||||
case CMD_EVENT_MENU_REMOVE_CURRENT_CONFIG_OVERRIDE_GAME:
|
||||
#ifdef HAVE_CONFIGFILE
|
||||
command_event_remove_current_config(OVERRIDE_GAME);
|
||||
#endif
|
||||
break;
|
||||
case CMD_EVENT_MENU_SAVE_CONFIG:
|
||||
|
Loading…
Reference in New Issue
Block a user