mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-04-09 18:45:40 +00:00
Merge pull request #5591 from leoetlino/wii-fix
Core: Misc WiiRoot fixes
This commit is contained in:
commit
3e1a650a3f
@ -481,6 +481,16 @@ static void EmuThread(std::unique_ptr<BootParameters> boot)
|
|||||||
INFO_LOG(CONSOLE, "%s", StopMessage(false, "Shutting down HW").c_str());
|
INFO_LOG(CONSOLE, "%s", StopMessage(false, "Shutting down HW").c_str());
|
||||||
HW::Shutdown();
|
HW::Shutdown();
|
||||||
INFO_LOG(CONSOLE, "%s", StopMessage(false, "HW shutdown").c_str());
|
INFO_LOG(CONSOLE, "%s", StopMessage(false, "HW shutdown").c_str());
|
||||||
|
|
||||||
|
// Clear on screen messages that haven't expired
|
||||||
|
OSD::ClearMessages();
|
||||||
|
|
||||||
|
// The config must be restored only after the whole HW has shut down,
|
||||||
|
// not when it is still running.
|
||||||
|
BootManager::RestoreConfig();
|
||||||
|
|
||||||
|
PatchEngine::Shutdown();
|
||||||
|
HLE::Clear();
|
||||||
}};
|
}};
|
||||||
|
|
||||||
if (!g_video_backend->Initialize(s_window_handle))
|
if (!g_video_backend->Initialize(s_window_handle))
|
||||||
@ -638,13 +648,6 @@ static void EmuThread(std::unique_ptr<BootParameters> boot)
|
|||||||
if (core_parameter.bCPUThread)
|
if (core_parameter.bCPUThread)
|
||||||
g_video_backend->Video_Cleanup();
|
g_video_backend->Video_Cleanup();
|
||||||
|
|
||||||
// Clear on screen messages that haven't expired
|
|
||||||
OSD::ClearMessages();
|
|
||||||
|
|
||||||
BootManager::RestoreConfig();
|
|
||||||
|
|
||||||
PatchEngine::Shutdown();
|
|
||||||
HLE::Clear();
|
|
||||||
// If we shut down normally, the stop message does not need to be triggered.
|
// If we shut down normally, the stop message does not need to be triggered.
|
||||||
stop_message_guard.Dismiss();
|
stop_message_guard.Dismiss();
|
||||||
}
|
}
|
||||||
@ -961,7 +964,10 @@ void UpdateWantDeterminism(bool initial)
|
|||||||
// We need to clear the cache because some parts of the JIT depend on want_determinism, e.g. use
|
// We need to clear the cache because some parts of the JIT depend on want_determinism, e.g. use
|
||||||
// of FMA.
|
// of FMA.
|
||||||
JitInterface::ClearCache();
|
JitInterface::ClearCache();
|
||||||
Core::InitializeWiiRoot(s_wants_determinism);
|
|
||||||
|
// Don't call InitializeWiiRoot during boot, because IOS already does it.
|
||||||
|
if (!initial)
|
||||||
|
Core::InitializeWiiRoot(s_wants_determinism);
|
||||||
|
|
||||||
Core::PauseAndLock(false, was_unpaused);
|
Core::PauseAndLock(false, was_unpaused);
|
||||||
}
|
}
|
||||||
|
@ -16,10 +16,6 @@
|
|||||||
#include "Core/Movie.h"
|
#include "Core/Movie.h"
|
||||||
#include "Core/NetPlayClient.h"
|
#include "Core/NetPlayClient.h"
|
||||||
|
|
||||||
#ifdef _WIN32
|
|
||||||
#include <Windows.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace Core
|
namespace Core
|
||||||
{
|
{
|
||||||
static std::string s_temp_wii_root;
|
static std::string s_temp_wii_root;
|
||||||
@ -56,8 +52,6 @@ static void InitializeDeterministicWiiSaves()
|
|||||||
|
|
||||||
void InitializeWiiRoot(bool use_temporary)
|
void InitializeWiiRoot(bool use_temporary)
|
||||||
{
|
{
|
||||||
ShutdownWiiRoot();
|
|
||||||
|
|
||||||
if (use_temporary)
|
if (use_temporary)
|
||||||
{
|
{
|
||||||
s_temp_wii_root = File::CreateTempDir();
|
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);
|
File::CopyDir(File::GetSysDirectory() + WII_USER_DIR, s_temp_wii_root);
|
||||||
WARN_LOG(IOS_FILEIO, "Using temporary directory %s for minimal Wii FS",
|
WARN_LOG(IOS_FILEIO, "Using temporary directory %s for minimal Wii FS",
|
||||||
s_temp_wii_root.c_str());
|
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);
|
File::SetUserPath(D_SESSION_WIIROOT_IDX, s_temp_wii_root);
|
||||||
// Generate a SYSCONF with default settings for the temporary Wii NAND.
|
// Generate a SYSCONF with default settings for the temporary Wii NAND.
|
||||||
SysConf sysconf{Common::FromWhichRoot::FROM_SESSION_ROOT};
|
SysConf sysconf{Common::FromWhichRoot::FROM_SESSION_ROOT};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user