don't fetch timestamp again

(cherry picked from commit ed43ec0277)
This commit is contained in:
expikr
2026-06-09 21:58:56 -07:00
committed by Sam Lantinga
parent dd1032282e
commit 2e604c2bbb

View File

@@ -719,11 +719,11 @@ static void WIN_HandleRawMouseInput(Uint64 timestamp, SDL_VideoData *data, HANDL
if (rawmouse->usButtonFlags & RI_MOUSE_WHEEL) {
SHORT amount = (SHORT)rawmouse->usButtonData;
float fAmount = (float)amount / WHEEL_DELTA;
SDL_SendMouseWheel(WIN_GetEventTimestamp(), window, mouseID, 0.0f, fAmount, SDL_MOUSEWHEEL_NORMAL);
SDL_SendMouseWheel(timestamp, window, mouseID, 0.0f, fAmount, SDL_MOUSEWHEEL_NORMAL);
} else if (rawmouse->usButtonFlags & RI_MOUSE_HWHEEL) {
SHORT amount = (SHORT)rawmouse->usButtonData;
float fAmount = (float)amount / WHEEL_DELTA;
SDL_SendMouseWheel(WIN_GetEventTimestamp(), window, mouseID, fAmount, 0.0f, SDL_MOUSEWHEEL_NORMAL);
SDL_SendMouseWheel(timestamp, window, mouseID, fAmount, 0.0f, SDL_MOUSEWHEEL_NORMAL);
}
/* Invalidate the mouse button flags. If we don't do this then disabling raw input