1
0
mirror of https://github.com/FunkyFr3sh/cnc-ddraw.git synced 2025-03-15 06:04:49 +01:00

fixes SetCursorPos hook with adjmouse enabled

This commit is contained in:
FunkyFr3sh 2020-11-05 22:45:40 +01:00
parent 263a97b22c
commit 9eaa5e9611

View File

@ -187,6 +187,13 @@ BOOL WINAPI fake_ScreenToClient(HWND hWnd, LPPOINT lpPoint)
BOOL WINAPI fake_SetCursorPos(int X, int Y)
{
POINT pt = { X, Y };
if (g_ddraw && g_ddraw->adjmouse)
{
pt.x *= g_ddraw->render.scale_w;
pt.y *= g_ddraw->render.scale_h;
}
return g_ddraw && real_ClientToScreen(g_ddraw->hwnd, &pt) && real_SetCursorPos(pt.x, pt.y);
}