mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
ImGui: move initialization code to DX hook setups
Also removed unused global declaration 'g_bImGuiInitialized'.
This commit is contained in:
parent
c3b0034478
commit
b9c7cabda9
@ -17,10 +17,6 @@ bool HCVideoMode_Common__CreateGameWindow(int* pnRect)
|
|||||||
g_nWindowRect[1] = pnRect[1];
|
g_nWindowRect[1] = pnRect[1];
|
||||||
|
|
||||||
const bool ret = CVideoMode_Common__CreateGameWindow(pnRect);
|
const bool ret = CVideoMode_Common__CreateGameWindow(pnRect);
|
||||||
|
|
||||||
if (!ImguiSystem_Init())
|
|
||||||
Error(eDLL_T::MS, 0, "ImGui system initialization failed!\n");
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -30,9 +30,6 @@ bool CMaterialSystem::Connect(CMaterialSystem* thisptr, const CreateInterfaceFn
|
|||||||
|
|
||||||
void CMaterialSystem::Disconnect(CMaterialSystem* thisptr)
|
void CMaterialSystem::Disconnect(CMaterialSystem* thisptr)
|
||||||
{
|
{
|
||||||
#ifndef MATERIALSYSTEM_NODX
|
|
||||||
ImguiSystem_Shutdown();
|
|
||||||
#endif
|
|
||||||
CMaterialSystem__Disconnect(thisptr);
|
CMaterialSystem__Disconnect(thisptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -349,6 +349,9 @@ void DirectX_Init()
|
|||||||
Assert(0);
|
Assert(0);
|
||||||
Error(eDLL_T::COMMON, 0xBAD0C0DE, "Failed to detour process: error code = %08x\n", hr);
|
Error(eDLL_T::COMMON, 0xBAD0C0DE, "Failed to detour process: error code = %08x\n", hr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!ImguiSystem_Init())
|
||||||
|
Error(eDLL_T::MS, 0, "ImGui system initialization failed!\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
void DirectX_Shutdown()
|
void DirectX_Shutdown()
|
||||||
@ -367,6 +370,9 @@ void DirectX_Shutdown()
|
|||||||
|
|
||||||
// Commit the transaction
|
// Commit the transaction
|
||||||
DetourTransactionCommit();
|
DetourTransactionCommit();
|
||||||
|
|
||||||
|
if (ImguiSystem_IsInitialized())
|
||||||
|
ImguiSystem_Shutdown();
|
||||||
}
|
}
|
||||||
|
|
||||||
void VDXGI::GetAdr(void) const
|
void VDXGI::GetAdr(void) const
|
||||||
|
@ -22,7 +22,6 @@ typedef HRESULT(__stdcall* IDXGIResizeBuffers) (IDXGISwapChain* pSwapChain, UI
|
|||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Globals
|
// Globals
|
||||||
extern BOOL g_bImGuiInitialized;
|
|
||||||
extern UINT g_nWindowRect[2]; // TODO[ AMOS ]: Remove this in favor of CGame's window rect members???
|
extern UINT g_nWindowRect[2]; // TODO[ AMOS ]: Remove this in favor of CGame's window rect members???
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
Loading…
x
Reference in New Issue
Block a user