Add GetDeviceModeFinder to WndProc (#102)

This commit is contained in:
Christian Semmler
2023-08-06 16:26:14 -04:00
committed by GitHub
parent b59d8ef5cf
commit d41b7f2ca4
5 changed files with 43 additions and 13 deletions

View File

@@ -357,7 +357,7 @@ LRESULT WINAPI WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
}
return DefWindowProcA(hWnd, uMsg, wParam, lParam);
case WM_DISPLAYCHANGE:
if (g_isle && VideoManager() && g_isle->m_fullScreen && VideoManager()->m_unk74 && VideoManager()->m_unk74[0x220]) {
if (g_isle && VideoManager() && g_isle->m_fullScreen && VideoManager()->GetDirect3D() && VideoManager()->GetDirect3D()->GetDeviceModeFinder()) {
int targetWidth = LOWORD(lParam);
int targetHeight = HIWORD(lParam);
int targetDepth = wParam;