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