Closed Andoryuuta closed 6 months ago
I tried this twice, and got 2 different crashes. One is the invalid dxgi call, and the other one seems to happen inside the ImGui WndProc handler.
The latter can be fixed simply by adding a check inside D3DModule::my_window_proc
to see if m_is_initialized
before calling ImGui_ImplWin32_WndProcHandler
(since the ResizeBuffers hook calls ImGui_ImplWin32_Shutdown
)
D3D Debug Layer Output when this happens:
DXGI ERROR: IDXGISwapChain::ResizeBuffers: Swapchain cannot be resized unless all outstanding buffer references have been released. [ MISCELLANEOUS ERROR #19: ]
Partially fixed in 15266c94970070204de7858a49e03d570b620ec3
Completely fixed in 314f5e79bf1bcf5e9638e117fe780cc4e28f529c.
The reason for the crash was an infinite recursion inside my_window_proc
due to a second SetWindowLongPtr
call upon graphics device reset.
Summary
When switching the game to windowed mode from fullscreen at the title (using alt+enter), the game crashes with
ERR11: Invalid GXGI call.
.This appears to happen right after the hooked ResizeBuffers function has been called:
Reproduction steps