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 a4d20094d7
commit 3ce436f5ff

View File

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