(RMenu) Get rid of main_wrap savestate_dir/sram_dir

This commit is contained in:
twinaphex 2013-04-29 05:44:32 +02:00
parent b0968790c6
commit 6cee86c768
3 changed files with 12 additions and 18 deletions

View File

@ -702,10 +702,10 @@ static int select_directory(void *data, uint64_t input)
switch(rgui->menu_type)
{
case PATH_SAVESTATES_DIR_CHOICE:
strlcpy(g_extern.console.main_wrap.default_savestate_dir, path, sizeof(g_extern.console.main_wrap.default_savestate_dir));
strlcpy(g_extern.savestate_dir, path, sizeof(g_extern.savestate_dir));
break;
case PATH_SRAM_DIR_CHOICE:
strlcpy(g_extern.console.main_wrap.default_sram_dir, path, sizeof(g_extern.console.main_wrap.default_sram_dir));
strlcpy(g_extern.savefile_dir, path, sizeof(g_extern.savefile_dir));
break;
case PATH_DEFAULT_ROM_DIR_CHOICE:
strlcpy(g_settings.rgui_browser_directory, path, sizeof(g_settings.rgui_browser_directory));
@ -728,10 +728,10 @@ static int select_directory(void *data, uint64_t input)
switch(rgui->menu_type)
{
case PATH_SAVESTATES_DIR_CHOICE:
strlcpy(g_extern.console.main_wrap.default_savestate_dir, path, sizeof(g_extern.console.main_wrap.default_savestate_dir));
strlcpy(g_extern.savestate_dir, path, sizeof(g_extern.savestate_dir));
break;
case PATH_SRAM_DIR_CHOICE:
strlcpy(g_extern.console.main_wrap.default_sram_dir, path, sizeof(g_extern.console.main_wrap.default_sram_dir));
strlcpy(g_extern.savefile_dir, path, sizeof(g_extern.savefile_dir));
break;
case PATH_DEFAULT_ROM_DIR_CHOICE:
strlcpy(g_settings.rgui_browser_directory, path, sizeof(g_settings.rgui_browser_directory));
@ -1279,7 +1279,7 @@ static int set_setting_action(uint8_t menu_type, unsigned switchvalue, uint64_t
}
if (input & (1ULL << DEVICE_NAV_START))
strlcpy(g_extern.console.main_wrap.default_savestate_dir, default_paths.savestate_dir, sizeof(g_extern.console.main_wrap.default_savestate_dir));
strlcpy(g_extern.savestate_dir, default_paths.savestate_dir, sizeof(g_extern.savestate_dir));
break;
case SETTING_PATH_SRAM_DIRECTORY:
@ -1290,7 +1290,7 @@ static int set_setting_action(uint8_t menu_type, unsigned switchvalue, uint64_t
}
if (input & (1ULL << DEVICE_NAV_START))
strlcpy(g_extern.console.main_wrap.default_sram_dir, default_paths.sram_dir, sizeof(g_extern.console.main_wrap.default_sram_dir));
strlcpy(g_extern.savefile_dir, default_paths.sram_dir, sizeof(g_extern.savefile_dir));
break;
#ifdef HAVE_XML
case SETTING_PATH_CHEATS:
@ -1342,11 +1342,11 @@ static int set_setting_action(uint8_t menu_type, unsigned switchvalue, uint64_t
{
strlcpy(g_settings.rgui_browser_directory, default_paths.filebrowser_startup_dir,
sizeof(g_settings.rgui_browser_directory));
strlcpy(g_extern.console.main_wrap.default_savestate_dir, default_paths.port_dir, sizeof(g_extern.console.main_wrap.default_savestate_dir));
strlcpy(g_extern.savestate_dir, default_paths.port_dir, sizeof(g_extern.savestate_dir));
#ifdef HAVE_XML
strlcpy(g_settings.cheat_database, default_paths.port_dir, sizeof(g_settings.cheat_database));
#endif
strlcpy(g_extern.console.main_wrap.default_sram_dir, "", sizeof(g_extern.console.main_wrap.default_sram_dir));
strlcpy(g_extern.savefile_dir, "", sizeof(g_extern.savefile_dir));
}
break;
case SETTING_CONTROLS_SCHEME:
@ -2064,12 +2064,12 @@ static int select_setting(void *data, uint64_t input)
break;
case SETTING_PATH_SAVESTATES_DIRECTORY:
strlcpy(text, "Savestate Directory", sizeof(text));
strlcpy(setting_text, g_extern.console.main_wrap.default_savestate_dir, sizeof(setting_text));
strlcpy(setting_text, g_extern.savestate_dir, sizeof(setting_text));
strlcpy(comment, "INFO - Directory where savestates will be saved to.", sizeof(comment));
break;
case SETTING_PATH_SRAM_DIRECTORY:
strlcpy(text, "SRAM Directory", sizeof(text));
strlcpy(setting_text, g_extern.console.main_wrap.default_sram_dir, sizeof(setting_text));
strlcpy(setting_text, g_extern.savefile_dir, sizeof(setting_text));
strlcpy(comment, "INFO - Set the default SaveRAM directory path.", sizeof(comment));
break;
#ifdef HAVE_XML

View File

@ -572,12 +572,6 @@ struct global
#endif
} sound;
struct
{
char default_savestate_dir[PATH_MAX];
char default_sram_dir[PATH_MAX];
} main_wrap;
#ifdef HAVE_OSKUTIL
struct
{

View File

@ -254,7 +254,7 @@ void config_set_defaults(void)
g_settings.video.aspect_ratio = -1.0f;
// g_extern
strlcpy(g_extern.console.main_wrap.default_sram_dir, default_paths.sram_dir, sizeof(g_extern.console.main_wrap.default_sram_dir));
strlcpy(g_extern.savefile_dir, default_paths.sram_dir, sizeof(g_extern.savefile_dir));
g_extern.console.screen.gamma_correction = DEFAULT_GAMMA;
g_extern.lifecycle_mode_state |= (1ULL << MODE_AUDIO_CUSTOM_BGM_ENABLE);
g_extern.lifecycle_mode_state |= (1ULL << MODE_VIDEO_THROTTLE_ENABLE);
@ -264,7 +264,7 @@ void config_set_defaults(void)
g_extern.console.screen.orientation = ORIENTATION_NORMAL;
g_extern.console.screen.resolutions.current.id = 0;
strlcpy(g_extern.console.main_wrap.default_savestate_dir, default_paths.savestate_dir, sizeof(g_extern.console.main_wrap.default_savestate_dir));
strlcpy(g_extern.savestate_dir, default_paths.savestate_dir, sizeof(g_extern.savestate_dir));
#ifdef HAVE_RMENU
strlcpy(g_extern.menu_texture_path, default_paths.menu_border_file, sizeof(g_extern.menu_texture_path));
#endif