aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJesse Talavera-Greenberg <jesse@jesse.tg>2023-09-24 12:33:14 -0400
committerGitHub <noreply@github.com>2023-09-24 18:33:14 +0200
commit9d9ba837316b0427f24e4b0883d26bb4fa2d36b8 (patch)
tree4ea332bcf1ddee341a76becd17ff4bced58ad5af /src
parent7d4a7969d9dd41d5e94d2e7adb668f5f0e85bbf4 (diff)
Clean up some rendering-related resources in DeInit (#1836)
- The unique_ptr destructors will take care of the cleanup
Diffstat (limited to 'src')
-rw-r--r--src/GPU.cpp2
-rw-r--r--src/GPU3D.cpp1
-rw-r--r--src/GPU3D_Soft.cpp2
3 files changed, 5 insertions, 0 deletions
diff --git a/src/GPU.cpp b/src/GPU.cpp
index 077fc8b..8cb8d73 100644
--- a/src/GPU.cpp
+++ b/src/GPU.cpp
@@ -176,6 +176,8 @@ void DeInit()
Framebuffer[0][1] = nullptr;
Framebuffer[1][0] = nullptr;
Framebuffer[1][1] = nullptr;
+
+ CurGLCompositor = nullptr;
}
void ResetVRAMCache()
diff --git a/src/GPU3D.cpp b/src/GPU3D.cpp
index dcd5bd7..8cc380a 100644
--- a/src/GPU3D.cpp
+++ b/src/GPU3D.cpp
@@ -286,6 +286,7 @@ bool Init()
void DeInit()
{
+ CurrentRenderer = nullptr;
}
void ResetRenderingState()
diff --git a/src/GPU3D_Soft.cpp b/src/GPU3D_Soft.cpp
index f7078b5..8848a54 100644
--- a/src/GPU3D_Soft.cpp
+++ b/src/GPU3D_Soft.cpp
@@ -39,6 +39,7 @@ void SoftRenderer::StopRenderThread()
Platform::Semaphore_Post(Sema_RenderStart);
Platform::Thread_Wait(RenderThread);
Platform::Thread_Free(RenderThread);
+ RenderThread = nullptr;
}
}
@@ -81,6 +82,7 @@ SoftRenderer::SoftRenderer() noexcept
Threaded = false;
RenderThreadRunning = false;
RenderThreadRendering = false;
+ RenderThread = nullptr;
}
SoftRenderer::~SoftRenderer()