From 6cef9cf77991bc69afdd57ce504fd86ca17aa8fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9?= <andrebq@gmail.com> Date: Tue, 16 Jun 2020 21:11:41 +0200 Subject: [PATCH] rename method and handle negative timeouts --- pixelgl/input.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pixelgl/input.go b/pixelgl/input.go index a0aa8e9..22468ef 100644 --- a/pixelgl/input.go +++ b/pixelgl/input.go @@ -413,11 +413,11 @@ func (w *Window) UpdateInput() { w.doUpdateInput() } -// WaitInput blocks until an event is received or a timeout. If timeout is 0 +// UpdateInputWait blocks until an event is received or a timeout. If timeout is 0 // then it will wait indefinitely -func (w *Window) WaitInput(timeout time.Duration) { +func (w *Window) UpdateInputWait(timeout time.Duration) { mainthread.Call(func() { - if timeout == 0 { + if timeout <= 0 { glfw.WaitEvents() } else { glfw.WaitEventsTimeout(timeout.Seconds()) -- GitLab