Fixed SRAM bug when closing emulator (FolderUtilities would get destroyed before Console, which caused a crash while trying to save the .sav file)
This commit is contained in:
parent
97e36a1e27
commit
cc67a333c5
3 changed files with 7 additions and 0 deletions
|
@ -25,6 +25,11 @@ shared_ptr<Console> Console::GetInstance()
|
|||
return Console::Instance;
|
||||
}
|
||||
|
||||
void Console::Release()
|
||||
{
|
||||
Console::Instance.reset(new Console());
|
||||
}
|
||||
|
||||
void Console::Initialize(string filename)
|
||||
{
|
||||
MessageManager::SendNotification(ConsoleNotificationType::GameStopped);
|
||||
|
|
|
@ -61,4 +61,5 @@ class Console
|
|||
static string GetROMPath();
|
||||
|
||||
static shared_ptr<Console> GetInstance();
|
||||
static void Release();
|
||||
};
|
||||
|
|
|
@ -122,6 +122,7 @@ namespace InteropEmu {
|
|||
|
||||
DllExport void __stdcall Release()
|
||||
{
|
||||
Console::Release();
|
||||
GameServer::StopServer();
|
||||
GameClient::Disconnect();
|
||||
MessageManager::RegisterMessageManager(nullptr);
|
||||
|
|
Loading…
Add table
Reference in a new issue