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

fix TA megamap mouse wheel zoom in windowed mode

This commit is contained in:
FunkyFr3sh 2023-10-05 02:17:01 +02:00
parent d04ada54d9
commit ce84abfac0
2 changed files with 14 additions and 0 deletions

View File

@ -652,6 +652,13 @@ BOOL WINAPI fake_PeekMessageA(LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT w
//return FALSE;
}
if (lpMsg->message == WM_MOUSEWHEEL)
{
POINT pt = { GET_X_LPARAM(lpMsg->lParam), GET_Y_LPARAM(lpMsg->lParam) };
real_ScreenToClient(g_ddraw->hwnd, &pt);
lpMsg->lParam = MAKELPARAM(pt.x, pt.y);
}
int x = max(GET_X_LPARAM(lpMsg->lParam) - g_ddraw->mouse.x_adjust, 0);
int y = max(GET_Y_LPARAM(lpMsg->lParam) - g_ddraw->mouse.y_adjust, 0);

View File

@ -789,6 +789,13 @@ LRESULT CALLBACK fake_WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam
return 0;
}
if (uMsg == WM_MOUSEWHEEL)
{
POINT pt = { GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam) };
real_ScreenToClient(g_ddraw->hwnd, &pt);
lParam = MAKELPARAM(pt.x, pt.y);
}
int x = max(GET_X_LPARAM(lParam) - g_ddraw->mouse.x_adjust, 0);
int y = max(GET_Y_LPARAM(lParam) - g_ddraw->mouse.y_adjust, 0);