minetest / irrlicht

Minetest's fork of Irrlicht
Other
114 stars 87 forks source link

SDL2 Wayland: Random, imprecise scrolling #219

Closed ndren closed 1 year ago

ndren commented 1 year ago

Scrolling with SDL_VIDEODRIVER=wayland on SDL2 builds is really weird (tested on sway). By going to Settings -> Open Settings (new menu) and scrolling down on the left side it sometimes scrolls up and scrolling up on the left side it sometimes scrolls down. (Tested with both a mouse and touchpad.)

Changing the sensitivity makes the problem slightly less bad, so I'm not sure what to think, but on Xorg this issue does not appear at all.

I'm not too familiar with the scrolling code, but I'm wondering whether replacing static_cast<float>(SDL_event.wheel.y) with SDL_event.wheel.preciseY would work here. I'll take a look.

ndren commented 1 year ago

Wow, it was that easy! I'll make a PR.