diff --git a/frontend/menu/backend/menu_common_backend.c b/frontend/menu/backend/menu_common_backend.c index a4292807dd..3dda31580f 100644 --- a/frontend/menu/backend/menu_common_backend.c +++ b/frontend/menu/backend/menu_common_backend.c @@ -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 : "", type_str_size); break; + case RGUI_AUTOCONFIG_DIR_PATH: + strlcpy(type_str, *g_settings.input.autoconfig_dir ? g_settings.input.autoconfig_dir : "", type_str_size); + break; case RGUI_SETTINGS_DISK_INDEX: { const struct retro_disk_control_callback *control = &g_extern.system.disk_control; diff --git a/frontend/menu/backend/menu_common_backend.h b/frontend/menu/backend/menu_common_backend.h index 78ea3ce2b4..8723ba28d0 100644 --- a/frontend/menu/backend/menu_common_backend.h +++ b/frontend/menu/backend/menu_common_backend.h @@ -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, diff --git a/frontend/menu/disp/rgui.c b/frontend/menu/disp/rgui.c index 39f414f691..7a4e021cb4 100644 --- a/frontend/menu/disp/rgui.c +++ b/frontend/menu/disp/rgui.c @@ -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) diff --git a/frontend/menu/disp/rmenu.c b/frontend/menu/disp/rmenu.c index 1f0e3401b4..4e06d87236 100644 --- a/frontend/menu/disp/rmenu.c +++ b/frontend/menu/disp/rmenu.c @@ -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) diff --git a/frontend/menu/disp/rmenu_xui.cpp b/frontend/menu/disp/rmenu_xui.cpp index 76905c4776..d559755344 100644 --- a/frontend/menu/disp/rmenu_xui.cpp +++ b/frontend/menu/disp/rmenu_xui.cpp @@ -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)