diff --git a/pixelgl/input.go b/pixelgl/input.go index ff98805..d8cbf1b 100644 --- a/pixelgl/input.go +++ b/pixelgl/input.go @@ -372,7 +372,8 @@ func (w *Window) initInput() { }) } -func (w *Window) updateInput() { +// UpdateInput polls window events. +func (w *Window) UpdateInput() { mainthread.Call(func() { glfw.PollEvents() }) diff --git a/pixelgl/window.go b/pixelgl/window.go index cb4dcf3..e501cc5 100644 --- a/pixelgl/window.go +++ b/pixelgl/window.go @@ -192,7 +192,7 @@ func (w *Window) Update() { w.end() }) - w.updateInput() + w.UpdateInput() } // SetClosed sets the closed flag of the Window.