mirror of
https://github.com/SourMesen/Mesen.git
synced 2025-04-02 10:52:48 -04:00
Fixed crash that occurred at shutdown when a Lua script save confirmation popup was shown (only when "Pause when in the background" option is enabled)
This commit is contained in:
parent
e8858a1a2f
commit
1e76d25986
3 changed files with 15 additions and 3 deletions
|
@ -26,6 +26,11 @@ VideoRenderer::~VideoRenderer()
|
|||
StopThread();
|
||||
}
|
||||
|
||||
void VideoRenderer::Release()
|
||||
{
|
||||
Instance.reset();
|
||||
}
|
||||
|
||||
void VideoRenderer::StartThread()
|
||||
{
|
||||
if(!_renderThread) {
|
||||
|
|
|
@ -27,6 +27,8 @@ public:
|
|||
VideoRenderer();
|
||||
~VideoRenderer();
|
||||
|
||||
static void Release();
|
||||
|
||||
void StartThread();
|
||||
void StopThread();
|
||||
|
||||
|
|
|
@ -313,6 +313,14 @@ namespace InteropEmu {
|
|||
DllExport void __stdcall Release()
|
||||
{
|
||||
_shortcutKeyHandler.reset();
|
||||
|
||||
Console::GetInstance()->Stop();
|
||||
|
||||
VideoDecoder::GetInstance()->StopThread();
|
||||
VideoDecoder::Release();
|
||||
|
||||
VideoRenderer::GetInstance()->StopThread();
|
||||
VideoRenderer::Release();
|
||||
|
||||
Console::Release();
|
||||
GameServer::StopServer();
|
||||
|
@ -327,9 +335,6 @@ namespace InteropEmu {
|
|||
delete _soundManager;
|
||||
_soundManager = nullptr;
|
||||
}
|
||||
|
||||
VideoDecoder::GetInstance()->StopThread();
|
||||
VideoDecoder::Release();
|
||||
}
|
||||
|
||||
DllExport void __stdcall TakeScreenshot() { VideoDecoder::GetInstance()->TakeScreenshot(); }
|
||||
|
|
Loading…
Add table
Reference in a new issue