From c878c43abf5270bf3070b204b2628352065a463d Mon Sep 17 00:00:00 2001 From: faiface Date: Mon, 6 May 2019 11:34:48 +0200 Subject: win: fix mouse move position on hiDPI --- win/win.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/win/win.go b/win/win.go index 4050da3..55cd434 100644 --- a/win/win.go +++ b/win/win.go @@ -200,7 +200,7 @@ func (w *Win) eventThread() { w.w.SetCursorPosCallback(func(_ *glfw.Window, x, y float64) { moX, moY = int(x), int(y) - w.eventsIn <- gui.Eventf("mo/move/%d/%d", moX, moY) + w.eventsIn <- gui.Eventf("mo/move/%d/%d", moX*w.ratio, moY*w.ratio) }) w.w.SetMouseButtonCallback(func(_ *glfw.Window, button glfw.MouseButton, action glfw.Action, mod glfw.ModifierKey) { -- cgit v1.2.3