Pārlūkot izejas kodu

Merge pull request #237 from mat007/fix-initial-mouse-xy

Fix mouse coordinates in mouse events on Mac
Daniel Salvadori 4 gadi atpakaļ
vecāks
revīzija
18b19ddef9
1 mainītis faili ar 2 papildinājumiem un 2 dzēšanām
  1. 2 2
      window/glfw.go

+ 2 - 2
window/glfw.go

@@ -319,8 +319,8 @@ func Init(width, height int, title string) error {
 		xpos, ypos := x.GetCursorPos()
 		w.mouseEv.Button = MouseButton(button)
 		w.mouseEv.Mods = ModifierKey(mods)
-		w.mouseEv.Xpos = float32(xpos * w.scaleX)
-		w.mouseEv.Ypos = float32(ypos * w.scaleY)
+		w.mouseEv.Xpos = float32(xpos) //* float32(w.scaleX) TODO
+		w.mouseEv.Ypos = float32(ypos) //* float32(w.scaleY)
 		if action == glfw.Press {
 			w.Dispatch(OnMouseDown, &w.mouseEv)
 		} else if action == glfw.Release {