From 4dc0b013f3667dd2214c45d0d33ef48e941a420b Mon Sep 17 00:00:00 2001 From: mewmew Date: Mon, 1 Jan 2018 21:04:56 +0100 Subject: [PATCH] pixelgl: export UpdateInput --- pixelgl/input.go | 3 ++- pixelgl/window.go | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) 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.