mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-27 18:21:15 +00:00
Improve WndProc accuracy
This commit is contained in:
parent
2a16a508a5
commit
5d7d621c81
@ -389,31 +389,34 @@ LRESULT WINAPI WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||||||
}
|
}
|
||||||
return DefWindowProcA(hWnd, uMsg, wParam, lParam);
|
return DefWindowProcA(hWnd, uMsg, wParam, lParam);
|
||||||
case WM_DISPLAYCHANGE:
|
case WM_DISPLAYCHANGE:
|
||||||
if (g_isle && VideoManager() && g_isle->m_fullScreen && VideoManager()->GetDirect3D() &&
|
if (g_isle && VideoManager() && g_isle->m_fullScreen && VideoManager()->GetDirect3D()) {
|
||||||
VideoManager()->GetDirect3D()->GetDeviceModeFinder()) {
|
if (VideoManager()->GetDirect3D()->GetDeviceModeFinder()) {
|
||||||
int targetWidth = LOWORD(lParam);
|
int targetDepth = wParam;
|
||||||
int targetHeight = HIWORD(lParam);
|
int targetWidth = LOWORD(lParam);
|
||||||
int targetDepth = wParam;
|
int targetHeight = HIWORD(lParam);
|
||||||
|
|
||||||
if (g_waitingForTargetDepth) {
|
if (g_waitingForTargetDepth) {
|
||||||
g_waitingForTargetDepth = 0;
|
g_waitingForTargetDepth = 0;
|
||||||
g_targetDepth = targetDepth;
|
g_targetDepth = targetDepth;
|
||||||
}
|
|
||||||
else {
|
|
||||||
BOOL valid = FALSE;
|
|
||||||
if (targetWidth == g_targetWidth && targetHeight == g_targetHeight && g_targetDepth == targetDepth) {
|
|
||||||
valid = TRUE;
|
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
BOOL valid = FALSE;
|
||||||
|
|
||||||
if (g_rmDisabled) {
|
if (g_targetWidth == targetWidth && g_targetHeight == targetHeight &&
|
||||||
if (valid) {
|
g_targetDepth == targetDepth) {
|
||||||
g_reqEnableRMDevice = 1;
|
valid = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (g_rmDisabled) {
|
||||||
|
if (valid) {
|
||||||
|
g_reqEnableRMDevice = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (!valid) {
|
||||||
|
g_rmDisabled = 1;
|
||||||
|
Lego()->StartTimer();
|
||||||
|
VideoManager()->DisableRMDevice();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else if (!valid) {
|
|
||||||
g_rmDisabled = 1;
|
|
||||||
Lego()->StartTimer();
|
|
||||||
VideoManager()->DisableRMDevice();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -433,8 +436,8 @@ LRESULT WINAPI WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||||||
if (lParam & (KF_REPEAT << 16)) {
|
if (lParam & (KF_REPEAT << 16)) {
|
||||||
return DefWindowProcA(hWnd, uMsg, wParam, lParam);
|
return DefWindowProcA(hWnd, uMsg, wParam, lParam);
|
||||||
}
|
}
|
||||||
keyCode = wParam;
|
|
||||||
type = c_notificationKeyPress;
|
type = c_notificationKeyPress;
|
||||||
|
keyCode = wParam;
|
||||||
break;
|
break;
|
||||||
case WM_MOUSEMOVE:
|
case WM_MOUSEMOVE:
|
||||||
g_mousemoved = 1;
|
g_mousemoved = 1;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user