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

Don't fake cursor position if mhack is disabled, clicking fixed

This commit is contained in:
Toni Spets 2010-11-26 21:18:48 +02:00
parent 020168f725
commit 1cba0b66b2

11
main.c
View File

@ -317,12 +317,15 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
case WM_RBUTTONDOWN:
case WM_LBUTTONUP:
case WM_RBUTTONUP:
if(!ddraw->locked)
if(ddraw->mhack)
{
mouse_lock();
return 0;
if(!ddraw->locked)
{
mouse_lock();
return 0;
}
lParam = MAKELPARAM(ddraw->cursor.x, ddraw->cursor.y);
}
lParam = MAKELPARAM(ddraw->cursor.x, ddraw->cursor.y);
case 1139: /* this somehow triggers network activity in RA, investigate */
return ddraw->WndProc(hWnd, uMsg, wParam, lParam);
}