app: fixed swapped horizontal scrolling directions on Windows

Signed-off-by: pierre <pierre.curto@gmail.com>
This commit is contained in:
pierre
2021-01-05 20:54:10 +01:00
committed by Elias Naur
parent 7bfdafb7b1
commit c030065af7
+4 -2
View File
@@ -373,9 +373,11 @@ func (w *window) scrollEvent(wParam, lParam uintptr, horizontal bool) {
windows.ScreenToClient(w.hwnd, &np)
p := f32.Point{X: float32(np.X), Y: float32(np.Y)}
dist := float32(int16(wParam >> 16))
sp := f32.Point{Y: -dist}
var sp f32.Point
if horizontal {
sp.X, sp.Y = sp.Y, sp.X
sp.X = dist
} else {
sp.Y = -dist
}
w.w.Event(pointer.Event{
Type: pointer.Scroll,