mirror of
https://github.com/YimMenu/YimMenuV2.git
synced 2026-10-10 03:43:15 +08:00
fix(renderer): don't destroy if we aren't initialized
This commit is contained in:
@@ -23,6 +23,9 @@ namespace YimMenu
|
||||
|
||||
void Renderer::DestroyImpl()
|
||||
{
|
||||
if (!m_Initialized)
|
||||
return;
|
||||
|
||||
// TODO: we aren't destroying resources properly
|
||||
ImGui_ImplWin32_Shutdown();
|
||||
|
||||
@@ -206,6 +209,7 @@ namespace YimMenu
|
||||
ImGui::StyleColorsDark();
|
||||
|
||||
LOG(INFO) << "DirectX 12 renderer has finished initializing.";
|
||||
m_Initialized = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -181,6 +181,7 @@ namespace YimMenu
|
||||
ExampleDescriptorHeapAllocator m_HeapAllocator;
|
||||
|
||||
private:
|
||||
bool m_Initialized;
|
||||
bool m_Resizing;
|
||||
|
||||
// Shared
|
||||
|
||||
Reference in New Issue
Block a user