summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/Common/Src/VideoBackendBase.h1
-rw-r--r--Source/Core/Core/Src/Core.cpp9
2 files changed, 10 insertions, 0 deletions
diff --git a/Source/Core/Common/Src/VideoBackendBase.h b/Source/Core/Common/Src/VideoBackendBase.h
index 311fa66104..4454bde8a7 100644
--- a/Source/Core/Common/Src/VideoBackendBase.h
+++ b/Source/Core/Common/Src/VideoBackendBase.h
@@ -102,6 +102,7 @@ public:
virtual void Video_Prepare() = 0;
virtual void Video_EnterLoop() = 0;
virtual void Video_ExitLoop() = 0;
+ virtual void Video_Cleanup() = 0; // called from gl/d3d thread
virtual void Video_BeginField(u32, FieldType, u32, u32) = 0;
virtual void Video_EndField() = 0;
diff --git a/Source/Core/Core/Src/Core.cpp b/Source/Core/Core/Src/Core.cpp
index a6c07eeaaa..87348e5a74 100644
--- a/Source/Core/Core/Src/Core.cpp
+++ b/Source/Core/Core/Src/Core.cpp
@@ -323,6 +323,9 @@ void CpuThread()
CCPU::Run();
g_bStarted = false;
+
+ if (!_CoreParameter.bCPUThread)
+ g_video_backend->Video_Cleanup();
return;
}
@@ -351,6 +354,9 @@ void FifoPlayerThread()
}
g_bStarted = false;
+
+ if(!_CoreParameter.bCPUThread)
+ g_video_backend->Video_Cleanup();
return;
}
@@ -477,6 +483,9 @@ void EmuThread()
g_cpu_thread.join();
INFO_LOG(CONSOLE, "%s", StopMessage(true, "CPU thread stopped.").c_str());
+
+ if(_CoreParameter.bCPUThread)
+ g_video_backend->Video_Cleanup();
VolumeHandler::EjectVolume();
FileMon::Close();