mirror of
https://github.com/FunkyFr3sh/cnc-ddraw.git
synced 2025-03-24 17:49:52 +01:00
fixes SetCursorPos hook with adjmouse enabled
This commit is contained in:
parent
263a97b22c
commit
9eaa5e9611
@ -187,6 +187,13 @@ BOOL WINAPI fake_ScreenToClient(HWND hWnd, LPPOINT lpPoint)
|
|||||||
BOOL WINAPI fake_SetCursorPos(int X, int Y)
|
BOOL WINAPI fake_SetCursorPos(int X, int Y)
|
||||||
{
|
{
|
||||||
POINT pt = { X, 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);
|
return g_ddraw && real_ClientToScreen(g_ddraw->hwnd, &pt) && real_SetCursorPos(pt.x, pt.y);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user