mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
Adds the option to change the path to the wii nand root
when nand root is changed the current sysconf is saved, and the sysconf in the new location is either loaded (if exists) or the default sysconf is created wii menu item is updated when the root changes small fix to saving gamelist paths to .ini paths that are removed from the gui are now removed from the ini instead of simply changing the number of paths git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7555 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -620,7 +620,7 @@ std::string GetSysDirectory()
|
||||
|
||||
// Returns a string with a Dolphin data dir or file in the user's home
|
||||
// directory. To be used in "multi-user" mode (that is, installed).
|
||||
std::string &GetUserPath(const unsigned int DirIDX)
|
||||
std::string &GetUserPath(const unsigned int DirIDX, const std::string &newPath)
|
||||
{
|
||||
static std::string paths[NUM_PATH_INDICES];
|
||||
|
||||
@ -638,8 +638,8 @@ std::string &GetUserPath(const unsigned int DirIDX)
|
||||
INFO_LOG(COMMON, "GetUserPath: Setting user directory to %s:", paths[D_USER_IDX].c_str());
|
||||
|
||||
paths[D_GCUSER_IDX] = paths[D_USER_IDX] + GC_USER_DIR DIR_SEP;
|
||||
paths[D_WIIUSER_IDX] = paths[D_USER_IDX] + WII_USER_DIR DIR_SEP;
|
||||
paths[D_WIIROOT_IDX] = paths[D_USER_IDX] + WII_USER_DIR;
|
||||
paths[D_WIIUSER_IDX] = paths[D_WIIROOT_IDX] + DIR_SEP;
|
||||
paths[D_CONFIG_IDX] = paths[D_USER_IDX] + CONFIG_DIR DIR_SEP;
|
||||
paths[D_GAMECONFIG_IDX] = paths[D_USER_IDX] + GAMECONFIG_DIR DIR_SEP;
|
||||
paths[D_MAPS_IDX] = paths[D_USER_IDX] + MAPS_DIR DIR_SEP;
|
||||
@ -657,7 +657,7 @@ std::string &GetUserPath(const unsigned int DirIDX)
|
||||
paths[D_DUMPDSP_IDX] = paths[D_USER_IDX] + DUMP_DSP_DIR DIR_SEP;
|
||||
paths[D_LOGS_IDX] = paths[D_USER_IDX] + LOGS_DIR DIR_SEP;
|
||||
paths[D_MAILLOGS_IDX] = paths[D_USER_IDX] + MAIL_LOGS_DIR DIR_SEP;
|
||||
paths[D_WIISYSCONF_IDX] = paths[D_USER_IDX] + WII_SYSCONF_DIR DIR_SEP;
|
||||
paths[D_WIISYSCONF_IDX] = paths[D_WIIUSER_IDX] + WII_SYSCONF_DIR DIR_SEP;
|
||||
paths[F_DOLPHINCONFIG_IDX] = paths[D_CONFIG_IDX] + DOLPHIN_CONFIG;
|
||||
paths[F_DSPCONFIG_IDX] = paths[D_CONFIG_IDX] + DSP_CONFIG;
|
||||
paths[F_DEBUGGERCONFIG_IDX] = paths[D_CONFIG_IDX] + DEBUGGER_CONFIG;
|
||||
@ -668,6 +668,26 @@ std::string &GetUserPath(const unsigned int DirIDX)
|
||||
paths[F_ARAMDUMP_IDX] = paths[D_DUMP_IDX] + ARAM_DUMP;
|
||||
paths[F_GCSRAM_IDX] = paths[D_GCUSER_IDX] + GC_SRAM;
|
||||
}
|
||||
|
||||
if (!newPath.empty())
|
||||
{
|
||||
if(DirIDX != D_WIIROOT_IDX)
|
||||
PanicAlert("trying to change user path other than wii root");
|
||||
|
||||
if (!File::IsDirectory(newPath))
|
||||
{
|
||||
WARN_LOG(COMMON, "Invalid path specified %s, wii user path will be set to default", newPath.c_str());
|
||||
paths[D_WIIROOT_IDX] = paths[D_USER_IDX] + WII_USER_DIR;
|
||||
}
|
||||
else
|
||||
{
|
||||
paths[D_WIIROOT_IDX] = newPath;
|
||||
}
|
||||
|
||||
paths[D_WIIUSER_IDX] = paths[D_WIIROOT_IDX] + DIR_SEP;
|
||||
paths[D_WIISYSCONF_IDX] = paths[D_WIIUSER_IDX] + WII_SYSCONF_DIR + DIR_SEP;
|
||||
paths[F_WIISYSCONF_IDX] = paths[D_WIISYSCONF_IDX] + WII_SYSCONF;
|
||||
}
|
||||
return paths[DirIDX];
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user