mirror of https://github.com/Genymobile/scrcpy
Fix "natural scrolling"
> Movements down (scroll backward) generate negative y values and up > (scroll forward) generate positive y values. > If direction is SDL_MOUSEWHEEL_FLIPPED the values in x and y will be > opposite. Multiply by -1 to change them back. <https://wiki.libsdl.org/SDL_MouseWheelEvent#Remarks> The x and y values already take the scrolling configuration into account. Reversing the values when the direction is flipped cancels the scrolling configuration. Therefore, just ignore the direction field. Fixes <https://github.com/Genymobile/scrcpy/issues/966>rotatedevice
parent
8a694a9785
commit
3100533e56
Loading…
Reference in New Issue