diff --git a/frontend/menu/menu_common.h b/frontend/menu/menu_common.h index 4919e0e5a6..b1ecbb33b7 100644 --- a/frontend/menu/menu_common.h +++ b/frontend/menu/menu_common.h @@ -135,6 +135,7 @@ typedef enum RGUI_SETTINGS_CORE_OPTIONS, RGUI_SETTINGS_AUDIO_OPTIONS, RGUI_SETTINGS_INPUT_OPTIONS, + RGUI_SETTINGS_PATH_OPTIONS, RGUI_SETTINGS_REWIND_ENABLE, RGUI_SETTINGS_REWIND_GRANULARITY, RGUI_SETTINGS_SRAM_AUTOSAVE, @@ -146,6 +147,10 @@ typedef enum #ifdef HAVE_SCREENSHOTS RGUI_SETTINGS_SCREENSHOT, #endif + RGUI_BROWSER_DIR_PATH, + RGUI_SAVESTATE_DIR_PATH, + RGUI_SAVEFILE_DIR_PATH, + RGUI_SYSTEM_DIR_PATH, RGUI_SETTINGS_RESTART_GAME, RGUI_SETTINGS_AUDIO_MUTE, RGUI_SETTINGS_AUDIO_CONTROL_RATE, diff --git a/frontend/menu/rgui.c b/frontend/menu/rgui.c index 5783af558f..bf01edab95 100644 --- a/frontend/menu/rgui.c +++ b/frontend/menu/rgui.c @@ -180,6 +180,7 @@ static bool menu_type_is_settings(unsigned type) type == RGUI_SETTINGS_VIDEO_OPTIONS || type == RGUI_SETTINGS_AUDIO_OPTIONS || type == RGUI_SETTINGS_DISK_OPTIONS || + type == RGUI_SETTINGS_PATH_OPTIONS || (type == RGUI_SETTINGS_INPUT_OPTIONS); } @@ -414,6 +415,7 @@ static void render_text(rgui_handle_t *rgui) snprintf(title, sizeof(title), "SHADER %s", dir); #endif else if ((menu_type == RGUI_SETTINGS_INPUT_OPTIONS) || + (menu_type == RGUI_SETTINGS_PATH_OPTIONS) || (menu_type == RGUI_SETTINGS_CUSTOM_VIEWPORT || menu_type == RGUI_SETTINGS_CUSTOM_VIEWPORT_2) || menu_type == RGUI_SETTINGS) snprintf(title, sizeof(title), "MENU %s", dir); @@ -589,6 +591,18 @@ static void render_text(rgui_handle_t *rgui) case RGUI_SETTINGS_DEBUG_TEXT: snprintf(type_str, sizeof(type_str), (g_extern.lifecycle_mode_state & (1ULL << MODE_FPS_DRAW)) ? "ON" : "OFF"); break; + case RGUI_BROWSER_DIR_PATH: + strlcpy(type_str, g_settings.rgui_browser_directory, sizeof(type_str)); + break; + case RGUI_SAVEFILE_DIR_PATH: + strlcpy(type_str, g_extern.savefile_dir, sizeof(type_str)); + break; + case RGUI_SAVESTATE_DIR_PATH: + strlcpy(type_str, g_extern.savestate_dir, sizeof(type_str)); + break; + case RGUI_SYSTEM_DIR_PATH: + strlcpy(type_str, g_settings.system_directory, sizeof(type_str)); + break; case RGUI_SETTINGS_DISK_INDEX: { const struct retro_disk_control_callback *control = &g_extern.system.disk_control; @@ -612,6 +626,7 @@ static void render_text(rgui_handle_t *rgui) case RGUI_SETTINGS_CORE: case RGUI_SETTINGS_DISK_APPEND: case RGUI_SETTINGS_INPUT_OPTIONS: + case RGUI_SETTINGS_PATH_OPTIONS: strlcpy(type_str, "...", sizeof(type_str)); break; case RGUI_SETTINGS_BIND_PLAYER: @@ -1186,6 +1201,7 @@ static void rgui_settings_populate_entries(rgui_handle_t *rgui) rgui_list_push(rgui->selection_buf, "Video Options", RGUI_SETTINGS_VIDEO_OPTIONS, 0); rgui_list_push(rgui->selection_buf, "Audio Options", RGUI_SETTINGS_AUDIO_OPTIONS, 0); rgui_list_push(rgui->selection_buf, "Input Options", RGUI_SETTINGS_INPUT_OPTIONS, 0); + rgui_list_push(rgui->selection_buf, "Path Options", RGUI_SETTINGS_PATH_OPTIONS, 0); if (g_extern.main_is_init && !g_extern.libretro_dummy) { @@ -1622,6 +1638,14 @@ static int shader_manager_toggle_setting(rgui_handle_t *rgui, unsigned setting, return 0; } +static void rgui_settings_path_populate_entries(rgui_handle_t *rgui) +{ + rgui_list_clear(rgui->selection_buf); + rgui_list_push(rgui->selection_buf, "Browser directory", RGUI_BROWSER_DIR_PATH, 0); + rgui_list_push(rgui->selection_buf, "Savestate directory", RGUI_SAVESTATE_DIR_PATH, 0); + rgui_list_push(rgui->selection_buf, "Savefile directory", RGUI_SAVEFILE_DIR_PATH, 0); + rgui_list_push(rgui->selection_buf, "System directory", RGUI_SYSTEM_DIR_PATH, 0); +} static void rgui_settings_controller_populate_entries(rgui_handle_t *rgui) { @@ -1947,6 +1971,8 @@ static int rgui_settings_iterate(rgui_handle_t *rgui, rgui_action_t action) rgui->need_refresh = false; if ((menu_type == RGUI_SETTINGS_INPUT_OPTIONS)) rgui_settings_controller_populate_entries(rgui); + else if ((menu_type == RGUI_SETTINGS_PATH_OPTIONS)) + rgui_settings_path_populate_entries(rgui); else if (menu_type == RGUI_SETTINGS_CORE_OPTIONS) rgui_settings_core_options_populate_entries(rgui); else if (menu_type == RGUI_SETTINGS_AUDIO_OPTIONS) diff --git a/frontend/menu/rmenu.c b/frontend/menu/rmenu.c index 1a29dfc7e3..2ab1e58d26 100644 --- a/frontend/menu/rmenu.c +++ b/frontend/menu/rmenu.c @@ -2055,9 +2055,9 @@ static int select_setting(void *data, uint64_t input) snprintf(comment, sizeof(comment), "INFO - [Custom BGM] is set to '%s'.", (g_extern.lifecycle_mode_state & (1ULL << MODE_AUDIO_CUSTOM_BGM_ENABLE)) ? "ON" : "OFF"); break; case SETTING_PATH_DEFAULT_ROM_DIRECTORY: - strlcpy(text, "Startup ROM Directory", sizeof(text)); + strlcpy(text, "Startup browser directory", sizeof(text)); strlcpy(setting_text, g_settings.rgui_browser_directory, sizeof(setting_text)); - strlcpy(comment, "INFO - Set the default Startup ROM directory path.", sizeof(comment)); + strlcpy(comment, "INFO - Set the default startup browser directory path.", sizeof(comment)); break; case SETTING_PATH_SAVESTATES_DIRECTORY: strlcpy(text, "Savestate Directory", sizeof(text));