HRESULT STDMETHODCALLTYPE Render::HookFn_ResizeBuffers(IDXGISwapChain
*
This, UINT BufferCount, UINT Width, UINT Height, DXGI_FORMAT NewFormat, UINT SwapChainFlags) {
if
(g_pRender
-
>g_pDevice) {
g_pRender
-
>g_pDevice
-
>Release();
g_pRender
-
>g_pmainRenderTargetView
-
>Release();
ImGui_ImplDX11_Shutdown();
g_pRender
-
>g_pDevice
=
nullptr;
g_pRender
-
>NeedReinitialization
=
true;
}
return
g_pRender
-
>Original_ResizeBuffers(This, BufferCount, Width, Height, NewFormat, SwapChainFlags);
}