diff --git a/Core/Console.cpp b/Core/Console.cpp index de8bb6a8..6b55762e 100644 --- a/Core/Console.cpp +++ b/Core/Console.cpp @@ -25,6 +25,11 @@ shared_ptr Console::GetInstance() return Console::Instance; } +void Console::Release() +{ + Console::Instance.reset(new Console()); +} + void Console::Initialize(string filename) { MessageManager::SendNotification(ConsoleNotificationType::GameStopped); diff --git a/Core/Console.h b/Core/Console.h index 396ae1b1..6672af22 100644 --- a/Core/Console.h +++ b/Core/Console.h @@ -61,4 +61,5 @@ class Console static string GetROMPath(); static shared_ptr GetInstance(); + static void Release(); }; diff --git a/InteropDLL/ConsoleWrapper.cpp b/InteropDLL/ConsoleWrapper.cpp index e62c5b31..0200e803 100644 --- a/InteropDLL/ConsoleWrapper.cpp +++ b/InteropDLL/ConsoleWrapper.cpp @@ -122,6 +122,7 @@ namespace InteropEmu { DllExport void __stdcall Release() { + Console::Release(); GameServer::StopServer(); GameClient::Disconnect(); MessageManager::RegisterMessageManager(nullptr);