mirror of
https://github.com/libretro/RetroArch
synced 2025-03-02 19:13:34 +00:00
(Menu) Add Autoconfig Dir Path option
This commit is contained in:
parent
1a12f76fb0
commit
496915eb20
@ -320,6 +320,7 @@ static void menu_common_entries_init(void *data, unsigned menu_type)
|
||||
#ifdef HAVE_SCREENSHOTS
|
||||
file_list_push(rgui->selection_buf, "Screenshot Directory", RGUI_SCREENSHOT_DIR_PATH, 0);
|
||||
#endif
|
||||
file_list_push(rgui->selection_buf, "Autoconfig Directory", RGUI_AUTOCONFIG_DIR_PATH, 0);
|
||||
break;
|
||||
case RGUI_SETTINGS_INPUT_OPTIONS:
|
||||
file_list_clear(rgui->selection_buf);
|
||||
@ -543,6 +544,7 @@ static unsigned menu_common_type_is(unsigned type)
|
||||
type == RGUI_SAVEFILE_DIR_PATH ||
|
||||
type == RGUI_OVERLAY_DIR_PATH ||
|
||||
type == RGUI_SCREENSHOT_DIR_PATH ||
|
||||
type == RGUI_AUTOCONFIG_DIR_PATH ||
|
||||
type == RGUI_SYSTEM_DIR_PATH;
|
||||
|
||||
if (type_found)
|
||||
@ -1544,6 +1546,11 @@ static int menu_common_iterate(void *data, unsigned action)
|
||||
strlcpy(g_settings.system_directory, dir, sizeof(g_settings.system_directory));
|
||||
menu_flush_stack_type(rgui, RGUI_SETTINGS_PATH_OPTIONS);
|
||||
}
|
||||
else if (menu_type == RGUI_AUTOCONFIG_DIR_PATH)
|
||||
{
|
||||
strlcpy(g_settings.input.autoconfig_dir, dir, sizeof(g_settings.input.autoconfig_dir));
|
||||
menu_flush_stack_type(rgui, RGUI_SETTINGS_PATH_OPTIONS);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (rgui->defer_core)
|
||||
@ -3066,6 +3073,10 @@ static int menu_common_setting_set(void *data, unsigned setting, unsigned action
|
||||
if (action == RGUI_ACTION_START)
|
||||
*g_settings.system_directory = '\0';
|
||||
break;
|
||||
case RGUI_AUTOCONFIG_DIR_PATH:
|
||||
if (action == RGUI_ACTION_START)
|
||||
*g_settings.input.autoconfig_dir = '\0';
|
||||
break;
|
||||
case RGUI_SETTINGS_VIDEO_ROTATION:
|
||||
if (action == RGUI_ACTION_START)
|
||||
{
|
||||
@ -4095,6 +4106,9 @@ static void menu_common_setting_set_label(char *type_str, size_t type_str_size,
|
||||
case RGUI_SYSTEM_DIR_PATH:
|
||||
strlcpy(type_str, *g_settings.system_directory ? g_settings.system_directory : "<ROM dir>", type_str_size);
|
||||
break;
|
||||
case RGUI_AUTOCONFIG_DIR_PATH:
|
||||
strlcpy(type_str, *g_settings.input.autoconfig_dir ? g_settings.input.autoconfig_dir : "<default>", type_str_size);
|
||||
break;
|
||||
case RGUI_SETTINGS_DISK_INDEX:
|
||||
{
|
||||
const struct retro_disk_control_callback *control = &g_extern.system.disk_control;
|
||||
|
@ -128,6 +128,7 @@ typedef enum
|
||||
RGUI_CONFIG_DIR_PATH,
|
||||
RGUI_OVERLAY_DIR_PATH,
|
||||
RGUI_SYSTEM_DIR_PATH,
|
||||
RGUI_AUTOCONFIG_DIR_PATH,
|
||||
RGUI_SETTINGS_RESTART_GAME,
|
||||
RGUI_SETTINGS_AUDIO_DSP_FILTER,
|
||||
RGUI_SETTINGS_AUDIO_MUTE,
|
||||
|
@ -358,6 +358,8 @@ static void rgui_render(void *data)
|
||||
else if (menu_type == RGUI_SCREENSHOT_DIR_PATH)
|
||||
snprintf(title, sizeof(title), "SCREENSHOT DIR %s", dir);
|
||||
#endif
|
||||
else if (menu_type == RGUI_AUTOCONFIG_DIR_PATH)
|
||||
snprintf(title, sizeof(title), "AUTOCONFIG DIR %s", dir);
|
||||
else if (menu_type == RGUI_SHADER_DIR_PATH)
|
||||
snprintf(title, sizeof(title), "SHADER DIR %s", dir);
|
||||
else if (menu_type == RGUI_FILTER_DIR_PATH)
|
||||
|
@ -217,6 +217,8 @@ static void rmenu_render(void *data)
|
||||
else if (menu_type == RGUI_SCREENSHOT_DIR_PATH)
|
||||
snprintf(title, sizeof(title), "SCREENSHOT DIR %s", dir);
|
||||
#endif
|
||||
else if (menu_type == RGUI_AUTOCONFIG_DIR_PATH)
|
||||
snprintf(title, sizeof(title), "AUTOCONFIG DIR %s", dir);
|
||||
else if (menu_type == RGUI_SHADER_DIR_PATH)
|
||||
snprintf(title, sizeof(title), "SHADER DIR %s", dir);
|
||||
else if (menu_type == RGUI_FILTER_DIR_PATH)
|
||||
|
@ -469,6 +469,8 @@ static void rmenu_xui_render(void *data)
|
||||
else if (menu_type == RGUI_SCREENSHOT_DIR_PATH)
|
||||
snprintf(title, sizeof(title), "SCREENSHOT DIR %s", dir);
|
||||
#endif
|
||||
else if (menu_type == RGUI_AUTOCONFIG_DIR_PATH)
|
||||
snprintf(title, sizeof(title), "AUTOCONFIG DIR %s", dir);
|
||||
else if (menu_type == RGUI_SHADER_DIR_PATH)
|
||||
snprintf(title, sizeof(title), "SHADER DIR %s", dir);
|
||||
else if (menu_type == RGUI_FILTER_DIR_PATH)
|
||||
|
Loading…
x
Reference in New Issue
Block a user