mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-03-12 14:46:49 +01:00
Core: Remove useless ShutdownWiiRoot calls
I don't see why we need to call ShutdownWiiRoot on InitializeWiiRoot. Also, atexit? Really? Not only is this unnecessary, it will also cause ShutdownWiiRoot to be called twice in rapid succession for no reason.
This commit is contained in:
parent
3eecf67a2a
commit
91bcd756ff
@ -16,10 +16,6 @@
|
||||
#include "Core/Movie.h"
|
||||
#include "Core/NetPlayClient.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <Windows.h>
|
||||
#endif
|
||||
|
||||
namespace Core
|
||||
{
|
||||
static std::string s_temp_wii_root;
|
||||
@ -56,8 +52,6 @@ static void InitializeDeterministicWiiSaves()
|
||||
|
||||
void InitializeWiiRoot(bool use_temporary)
|
||||
{
|
||||
ShutdownWiiRoot();
|
||||
|
||||
if (use_temporary)
|
||||
{
|
||||
s_temp_wii_root = File::CreateTempDir();
|
||||
@ -69,12 +63,6 @@ void InitializeWiiRoot(bool use_temporary)
|
||||
File::CopyDir(File::GetSysDirectory() + WII_USER_DIR, s_temp_wii_root);
|
||||
WARN_LOG(IOS_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);
|
||||
// Generate a SYSCONF with default settings for the temporary Wii NAND.
|
||||
SysConf sysconf{Common::FromWhichRoot::FROM_SESSION_ROOT};
|
||||
|
Loading…
x
Reference in New Issue
Block a user