mirror of
https://gitlab.com/Mr_Goldberg/goldberg_emulator
synced 2025-07-07 06:52:15 +08:00
Don't free objects with shutdown
Some games don't like to free the DX objects after the game has shut down.
This commit is contained in:
@ -212,7 +212,18 @@ DX11_Hook::~DX11_Hook()
|
||||
{
|
||||
PRINT_DEBUG("DX11 Hook removed\n");
|
||||
|
||||
resetRenderState();
|
||||
if (initialized)
|
||||
{
|
||||
mainRenderTargetView->Release();
|
||||
pContext->Release();
|
||||
|
||||
//ImGui_ImplDX11_Shutdown();
|
||||
ImGui_ImplDX11_InvalidateDeviceObjects();
|
||||
Windows_Hook::Inst().resetRenderState();
|
||||
ImGui::DestroyContext();
|
||||
|
||||
initialized = false;
|
||||
}
|
||||
|
||||
FreeLibrary(reinterpret_cast<HMODULE>(_library));
|
||||
|
||||
|
Reference in New Issue
Block a user