mirror of
https://github.com/FunkyFr3sh/cnc-ddraw.git
synced 2025-03-15 06:04:49 +01:00
Revert "don't update cursor pos in mouse hook"
This reverts commit c1a5a3895b53462bb5fa8feac57a1b240538e780.
This commit is contained in:
parent
cdb68e9dd1
commit
801d31f68e
@ -168,6 +168,9 @@ LRESULT CALLBACK mouse_gm_hook_proc(int code, WPARAM wParam, LPARAM lParam)
|
||||
x = min(x, g_ddraw.width - 1);
|
||||
y = min(y, g_ddraw.height - 1);
|
||||
|
||||
InterlockedExchange((LONG*)&g_ddraw.cursor.x, x);
|
||||
InterlockedExchange((LONG*)&g_ddraw.cursor.y, y);
|
||||
|
||||
msg->lParam = MAKELPARAM(x, y);
|
||||
|
||||
break;
|
||||
|
@ -675,12 +675,8 @@ void HandleMessage(LPMSG lpMsg, HWND hWnd)
|
||||
{
|
||||
// Does not work with 'New Robinson'
|
||||
lpMsg->message = (UINT)MAKELONG(WM_NULL, HIWORD(lpMsg->message));
|
||||
break;
|
||||
}
|
||||
|
||||
InterlockedExchange((LONG*)&g_ddraw.cursor.x, GET_X_LPARAM(lpMsg->lParam));
|
||||
InterlockedExchange((LONG*)&g_ddraw.cursor.y, GET_Y_LPARAM(lpMsg->lParam));
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -816,9 +816,6 @@ LRESULT CALLBACK fake_WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam
|
||||
return 0;
|
||||
}
|
||||
|
||||
InterlockedExchange((LONG*)&g_ddraw.cursor.x, GET_X_LPARAM(lParam));
|
||||
InterlockedExchange((LONG*)&g_ddraw.cursor.y, GET_Y_LPARAM(lParam));
|
||||
|
||||
break;
|
||||
}
|
||||
case WM_PARENTNOTIFY:
|
||||
|
Loading…
x
Reference in New Issue
Block a user