mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-26 07:39:45 -06:00
Split VideoBackend::Cleanup from Shutdown.
First is called from ogl/d3d thread, second is called from emulation thread (x11...)
This commit is contained in:
@ -15,6 +15,7 @@ class VideoBackend : public VideoBackendHardware
|
||||
std::string GetName();
|
||||
|
||||
void Video_Prepare();
|
||||
void Video_Cleanup();
|
||||
|
||||
void ShowConfig(void* parent);
|
||||
|
||||
|
@ -207,6 +207,7 @@ void VideoBackend::Shutdown()
|
||||
{
|
||||
s_BackendInitialized = false;
|
||||
|
||||
// TODO: should be in Video_Cleanup
|
||||
if (g_renderer)
|
||||
{
|
||||
s_efbAccessRequested = FALSE;
|
||||
@ -234,4 +235,7 @@ void VideoBackend::Shutdown()
|
||||
}
|
||||
}
|
||||
|
||||
void VideoBackend::Video_Cleanup() {
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -15,6 +15,7 @@ class VideoBackend : public VideoBackendHardware
|
||||
std::string GetName();
|
||||
|
||||
void Video_Prepare();
|
||||
void Video_Cleanup();
|
||||
|
||||
void ShowConfig(void* parent);
|
||||
|
||||
|
@ -190,6 +190,7 @@ void VideoBackend::Shutdown()
|
||||
{
|
||||
s_BackendInitialized = false;
|
||||
|
||||
// TODO: should be in Video_Cleanup
|
||||
if (g_renderer)
|
||||
{
|
||||
s_efbAccessRequested = FALSE;
|
||||
@ -217,4 +218,7 @@ void VideoBackend::Shutdown()
|
||||
D3D::Shutdown();
|
||||
}
|
||||
|
||||
void VideoBackend::Video_Cleanup() {
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -15,6 +15,7 @@ class VideoBackend : public VideoBackendHardware
|
||||
std::string GetName();
|
||||
|
||||
void Video_Prepare();
|
||||
void Video_Cleanup();
|
||||
|
||||
void ShowConfig(void* parent);
|
||||
|
||||
|
@ -210,7 +210,11 @@ void VideoBackend::Video_Prepare()
|
||||
void VideoBackend::Shutdown()
|
||||
{
|
||||
s_BackendInitialized = false;
|
||||
GLInterface->Shutdown();
|
||||
}
|
||||
|
||||
void VideoBackend::Video_Cleanup() {
|
||||
|
||||
if (g_renderer)
|
||||
{
|
||||
s_efbAccessRequested = false;
|
||||
@ -236,7 +240,6 @@ void VideoBackend::Shutdown()
|
||||
delete g_renderer;
|
||||
g_renderer = NULL;
|
||||
}
|
||||
GLInterface->Shutdown();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -132,11 +132,17 @@ void VideoSoftware::EmuStateChange(EMUSTATE_CHANGE newState)
|
||||
|
||||
void VideoSoftware::Shutdown()
|
||||
{
|
||||
// TODO: should be in Video_Cleanup
|
||||
HwRasterizer::Shutdown();
|
||||
SWRenderer::Shutdown();
|
||||
|
||||
GLInterface->Shutdown();
|
||||
}
|
||||
|
||||
void VideoSoftware::Video_Cleanup()
|
||||
{
|
||||
}
|
||||
|
||||
// This is called after Video_Initialize() from the Core
|
||||
void VideoSoftware::Video_Prepare()
|
||||
{
|
||||
|
@ -21,6 +21,7 @@ class VideoSoftware : public VideoBackend
|
||||
void ShowConfig(void* parent);
|
||||
|
||||
void Video_Prepare();
|
||||
void Video_Cleanup();
|
||||
|
||||
void Video_EnterLoop();
|
||||
void Video_ExitLoop();
|
||||
|
Reference in New Issue
Block a user