On emscripten, is delta-x of mousewheel event scaled correctly?
Whilst looking at imgui's SDL support code, I noticed it scales the wheel delta x of a mouse wheel event by around 100. link to code
Is the need for this extra scale factor expected?
We probably need to divide the values coming in by 120. Take a look at the WHEEL_DELTA code in SDL_windowsevents.c for reference.
I'll take a look at this.
Actually it turns out 100 is the right value for the browser (rather, it's one of three possible units of measurement, and we handle them all).
But we were only adjusting the Y value and not the X value, which is why Dear Imgui has a hardcoded / 100 in there for X.
CC @ocornut: that extra division on Emscripten can be removed now for SDL3 (and the fix has been applied to SDL2, too, and will be in the 2.30.9 release).
Thank you Sam, pushed https://github.com/ocornut/imgui/commit/06092a9756b5476ad0b36d6f980fe904a87418da for Dear ImGui.