diff --git a/src/video/windows/SDL_windowsmouse.c b/src/video/windows/SDL_windowsmouse.c index a95e58254118e..0b6b5abf1a1b0 100644 --- a/src/video/windows/SDL_windowsmouse.c +++ b/src/video/windows/SDL_windowsmouse.c @@ -710,12 +710,14 @@ void WIN_UpdateMouseSystemScale(void) data->enhanced = false; int v; - int params[3]; - if (SystemParametersInfo(SPI_GETMOUSESPEED, 0, &v, 0) && - SystemParametersInfo(SPI_GETMOUSE, 0, ¶ms, 0)) { + if (SystemParametersInfo(SPI_GETMOUSESPEED, 0, &v, 0)) { v = SDL_max(1, SDL_min(v, 20)); - ReadMouseCurve(v, data->xs, data->ys); data->dpiscale = SDL_max(SDL_max(v, (v - 2) << 2), (v - 6) << 3); + } + + int params[3]; + if (SystemParametersInfo(SPI_GETMOUSE, 0, ¶ms, 0)) { + ReadMouseCurve(v, data->xs, data->ys); data->enhanced = params[2] ? true : false; } }