From f57cf7b3b6b31718d5c70e8788c1005815d9c99a Mon Sep 17 00:00:00 2001 From: Christian Semmler Date: Mon, 26 Jun 2023 22:19:47 +0200 Subject: [PATCH] fix x/y comparison --- ISLE/main.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ISLE/main.cpp b/ISLE/main.cpp index 7c56be2e..f3a0aae6 100644 --- a/ISLE/main.cpp +++ b/ISLE/main.cpp @@ -288,12 +288,12 @@ LRESULT WINAPI WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) InputManager()->QueueEvent(type, wParam, LOWORD(lParam), HIWORD(lParam), keyCode); } if (g_isle && g_isle->m_drawCursor && type == MOUSEMOVE) { - unsigned int x = LOWORD(lParam); - unsigned int y = HIWORD(lParam); - if (639 < x) { + int x = LOWORD(lParam); + int y = HIWORD(lParam); + if (x >= 640) { x = 639; } - if (479 < y) { + if (y >= 480) { y = 479; } VideoManager()->MoveCursor(x,y);