From 64101137cd6e507942364fb7e446692d69277341 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Lam?= Date: Fri, 6 Jan 2017 21:59:02 +0100 Subject: Remove pre-generated SYSCONF Dolphin is able to generate one with all correct default settings, so we don't need to ship with a pre-generated SYSCONF and worry about syncing default settings. Additionally, this commit changes SysConf to work with session SYSCONFs so that Dolphin is able to generate a default one even for Movie/TAS. Which SYSCONF needs to be touched is explicitly specified to avoid confusion about which file SysConf is managing. (Another notable change is that the Wii root functions are moved into Core to prevent Common from depending on Core.) --- Source/Core/Common/NandPaths.cpp | 41 +--------------------------------------- 1 file changed, 1 insertion(+), 40 deletions(-) (limited to 'Source/Core/Common/NandPaths.cpp') diff --git a/Source/Core/Common/NandPaths.cpp b/Source/Core/Common/NandPaths.cpp index 60cb49fa26..99c75f01f8 100644 --- a/Source/Core/Common/NandPaths.cpp +++ b/Source/Core/Common/NandPaths.cpp @@ -20,46 +20,7 @@ namespace Common { -static std::string s_temp_wii_root; - -void InitializeWiiRoot(bool use_dummy) -{ - ShutdownWiiRoot(); - if (use_dummy) - { - s_temp_wii_root = File::CreateTempDir(); - if (s_temp_wii_root.empty()) - { - ERROR_LOG(WII_IPC_FILEIO, "Could not create temporary directory"); - return; - } - File::CopyDir(File::GetSysDirectory() + WII_USER_DIR, s_temp_wii_root); - WARN_LOG(WII_IPC_FILEIO, "Using temporary directory %s for minimal Wii FS", - s_temp_wii_root.c_str()); - static bool s_registered; - if (!s_registered) - { - s_registered = true; - atexit(ShutdownWiiRoot); - } - File::SetUserPath(D_SESSION_WIIROOT_IDX, s_temp_wii_root); - } - else - { - File::SetUserPath(D_SESSION_WIIROOT_IDX, File::GetUserPath(D_WIIROOT_IDX)); - } -} - -void ShutdownWiiRoot() -{ - if (!s_temp_wii_root.empty()) - { - File::DeleteDirRecursively(s_temp_wii_root); - s_temp_wii_root.clear(); - } -} - -static std::string RootUserPath(FromWhichRoot from) +std::string RootUserPath(FromWhichRoot from) { int idx = from == FROM_CONFIGURED_ROOT ? D_WIIROOT_IDX : D_SESSION_WIIROOT_IDX; return File::GetUserPath(idx); -- cgit v1.2.3