My employer asked me to fix annoying crashes in legacy Direct3D9 application. Calls to IDirect3DDevice9::Reset method(while "Alt-Tabing") in fullscreen mode raise exception. DirectX 9 documentation says nothing about possible exception in IDirect3DDevice9::Reset. Here is my D3DPRESENT_PARAMETERS input parameter:
Codebase is HUGE and I have only minor OpenGL skills. Wasted some night already. Just have no idea where to search for error.
This looks suspicious: FullScreen_RefreshRateInHz
: "For full-screen mode, the refresh rate is one of the refresh rates returned by EnumAdapterModes
".
Perhaps 0
means something else than 0 Hz
but if it doesn't, that could definitely be the cause of a division by zero