internal/ui: bug fix: wrong calculation of wheel scrolling

Closes #2487
This commit is contained in:
Hajime Hoshi 2022-12-08 02:09:58 +09:00
parent 102a2d2138
commit 14688348a8

View File

@ -176,8 +176,8 @@ func (i *Input) update(window *glfw.Window, context *context) error {
// As this function is called from GLFW callbacks, the current thread is main. // As this function is called from GLFW callbacks, the current thread is main.
i.ui.m.Lock() i.ui.m.Lock()
defer i.ui.m.Unlock() defer i.ui.m.Unlock()
i.scrollX = xoff i.scrollX += xoff
i.scrollY = yoff i.scrollY += yoff
})) }))
}) })
if i.keyPressed == nil { if i.keyPressed == nil {