1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-01-18 20:52:10 +01:00

[d3d9] Cleanup ResetWindowProc

This commit is contained in:
Joshua Ashton 2020-04-06 19:45:15 +01:00
parent 135d246610
commit 6cf052b3f2

View File

@ -1498,10 +1498,11 @@ namespace dxvk {
? (WNDPROC)GetWindowLongPtrW(m_window, GWLP_WNDPROC)
: (WNDPROC)GetWindowLongPtrA(m_window, GWLP_WNDPROC);
if (proc == D3D9WindowProc && it->second.unicode)
SetWindowLongPtrW(m_window, GWLP_WNDPROC, (LONG_PTR)it->second.proc);
else if (proc == D3D9WindowProc && !it->second.unicode)
SetWindowLongPtrA(m_window, GWLP_WNDPROC, (LONG_PTR)it->second.proc);
if (proc == D3D9WindowProc) {
it->second.unicode
? SetWindowLongPtrW(m_window, GWLP_WNDPROC, (LONG_PTR)it->second.proc)
: SetWindowLongPtrA(m_window, GWLP_WNDPROC, (LONG_PTR)it->second.proc);
}
g_windowProcMap.erase(m_window);
}