Fixed Windows MouseWheel Event being +120 or -120, we want +1 or -1
All checks were successful
Run ReCI Build Test / Explore-Gitea-Actions (push) Successful in 2m7s

This commit is contained in:
2025-03-08 16:05:08 -05:00
parent 0ba3618b3c
commit aebc6fcfd3

View File

@@ -92,8 +92,11 @@ LRESULT CALLBACK WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
//Mouse Buttons.
case WM_MOUSEWHEEL: {
int wheel_delta = GET_WHEEL_DELTA_WPARAM(wParam);
// Clamp to normalized range [+1 or -1].
// TODO: Test this and make sure sign is the same on both platforms for each direction.
wheel_delta = (wheel_delta > 0) : 1 ? -1;
// TODO: Determine sign of wheel_delta for each direction, (and on linux too), and document this.
window->processMouseWheel(wheel_delta);\
window->processMouseWheel(wheel_delta);
break;
}