Clean up some rendering-related resources in DeInit (#1836)

- The unique_ptr destructors will take care of the cleanup
This commit is contained in:
Jesse Talavera-Greenberg 2023-09-24 12:33:14 -04:00 committed by GitHub
parent 7d4a7969d9
commit 9d9ba83731
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 0 deletions

View File

@ -176,6 +176,8 @@ void DeInit()
Framebuffer[0][1] = nullptr;
Framebuffer[1][0] = nullptr;
Framebuffer[1][1] = nullptr;
CurGLCompositor = nullptr;
}
void ResetVRAMCache()

View File

@ -286,6 +286,7 @@ bool Init()
void DeInit()
{
CurrentRenderer = nullptr;
}
void ResetRenderingState()

View File

@ -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()