Backends: GLFW: Removed mouse-wheel value scaling for Emscripten. (#4019, #6096, #6081)

This commit is contained in:
ocornut 2023-02-02 14:37:15 +01:00
parent f822e07d76
commit 0370856d78
2 changed files with 5 additions and 5 deletions

View File

@ -287,8 +287,8 @@ void ImGui_ImplGlfw_ScrollCallback(GLFWwindow* window, double xoffset, double yo
#if defined(__EMSCRIPTEN__) #if defined(__EMSCRIPTEN__)
// Emscripten's GLFW emulation reports grossly mis-scaled and flipped scroll events. // Emscripten's GLFW emulation reports grossly mis-scaled and flipped scroll events.
// The scale is still currently incorrect, see #4019 #6096 for details. // The scale is still currently incorrect, see #4019 #6096 for details.
xoffset /= -120.0f; xoffset = -xoffset;
yoffset /= -120.0f; yoffset = -yoffset;
#endif #endif
ImGuiIO& io = ImGui::GetIO(); ImGuiIO& io = ImGui::GetIO();

View File

@ -45,8 +45,8 @@ Breaking changes:
offer consistent horizontal scrolling direction. (#4019) offer consistent horizontal scrolling direction. (#4019)
- Backends: SDL: flipping SDL_MOUSEWHEEL 'wheel.x' value to match other backends and - Backends: SDL: flipping SDL_MOUSEWHEEL 'wheel.x' value to match other backends and
offer consistent horizontal scrolling direction. (#4019) offer consistent horizontal scrolling direction. (#4019)
- Backends: GLFW+Emscripten: flipping both wheels axises + scaling magnitude down when - Backends: GLFW+Emscripten: flipping both wheels axises when running on Emscripten's
running on Emscripten's GLFW emulation. (#6096) [@topolarity] GLFW emulation. (#6096) [@topolarity]
- Shift+WheelY support on non-OSX machines was already correct. (#2424, #1463) - Shift+WheelY support on non-OSX machines was already correct. (#2424, #1463)
(whereaas on OSX machines Shift+WheelY turns into WheelX at the OS level). (whereaas on OSX machines Shift+WheelY turns into WheelX at the OS level).
- If you use a custom-backend, you should verify that: - If you use a custom-backend, you should verify that:
@ -58,7 +58,7 @@ Breaking changes:
- (*) both axises flipped On Windows for touchpad only when 'Settings->Touchpad->Down motion scrolls up' is set. - (*) both axises flipped On Windows for touchpad only when 'Settings->Touchpad->Down motion scrolls up' is set.
- You can use 'Demo->Tools->Debug Log->IO" to visualize values submitted to Dear ImGui. - You can use 'Demo->Tools->Debug Log->IO" to visualize values submitted to Dear ImGui.
- Known issues remaining with Emscripten: - Known issues remaining with Emscripten:
- The magnitude of wheeling values on Emscripten setups is still mostly wrong. (#6096) - The magnitude of wheeling values on Emscripten setups is still not great. (#6096)
- When running the Emscripten app on a Mac with a mouse, SHIFT+WheelY doesn't turn into WheelX. - When running the Emscripten app on a Mac with a mouse, SHIFT+WheelY doesn't turn into WheelX.
This is because we don't know that we are running on Mac and apply our own Shift+swapping This is because we don't know that we are running on Mac and apply our own Shift+swapping
on top of OSX' own swapping, so wheel axises are swapped twice. Emscripten apps may need on top of OSX' own swapping, so wheel axises are swapped twice. Emscripten apps may need