summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authordegasus <wickmarkus@web.de>2013-02-26 16:42:32 +0100
committerdegasus <wickmarkus@web.de>2013-02-26 16:42:32 +0100
commit4883fa268fa60751a2c1fc0dd77ce022987daf21 (patch)
tree6122526a49e1bdabc040854a427bea8c71667e81 /Source/Core
parent90ff648d002b6a4f24fc63a43d90e1447809b39c (diff)
Split VideoBackend::Cleanup from Shutdown.
First is called from ogl/d3d thread, second is called from emulation thread (x11...)
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();