rename method and handle negative timeouts

This commit is contained in:
André 2020-06-16 21:11:41 +02:00
parent 1f914181d8
commit 6cef9cf779
1 changed files with 3 additions and 3 deletions

View File

@ -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())