From efbf7e7b30794d74bd6606dc6dd49a193b87a951 Mon Sep 17 00:00:00 2001 From: FunkyFr3sh Date: Tue, 10 Sep 2024 15:41:29 +0200 Subject: [PATCH] Revert "remove debug code" This reverts commit 75ed1595c6288a55e0d7ba4410c169a7e1c3b445. --- src/dd.c | 2 ++ src/winapi_hooks.c | 3 +++ 2 files changed, 5 insertions(+) diff --git a/src/dd.c b/src/dd.c index 1ec2bef..fee3a21 100644 --- a/src/dd.c +++ b/src/dd.c @@ -993,6 +993,8 @@ HRESULT dd_SetDisplayMode(DWORD dwWidth, DWORD dwHeight, DWORD dwBPP, DWORD dwFl g_ddraw.mouse.unscale_y = ((float)(g_ddraw.height - 1) / (g_ddraw.render.viewport.height - 1)); } + TRACE("sdm unscale_x %.6f, y=%.6f\n", g_ddraw.mouse.unscale_x, g_ddraw.mouse.unscale_y); + g_ddraw.mouse.x_adjust = g_ddraw.render.viewport.x; g_ddraw.mouse.y_adjust = g_ddraw.render.viewport.y; diff --git a/src/winapi_hooks.c b/src/winapi_hooks.c index 2dc5fe4..33ee191 100644 --- a/src/winapi_hooks.c +++ b/src/winapi_hooks.c @@ -647,6 +647,8 @@ BOOL HandleMessage(LPMSG lpMsg, HWND hWnd) { if (!g_config.devmode && !g_mouse_locked) { + TRACE("HandleMessage %s hWnd=%p, lpMsg->hWnd=%p\n", dbg_mes_to_str(lpMsg->message), hWnd, lpMsg->hwnd); + InterlockedExchange((LONG*)&g_ddraw.cursor.x, GET_X_LPARAM(lpMsg->lParam)); InterlockedExchange((LONG*)&g_ddraw.cursor.y, GET_Y_LPARAM(lpMsg->lParam)); @@ -681,6 +683,7 @@ BOOL HandleMessage(LPMSG lpMsg, HWND hWnd) break; } + } }