rename method and handle negative timeouts
This commit is contained in:
parent
1f914181d8
commit
6cef9cf779
|
@ -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())
|
||||
|
|
Loading…
Reference in New Issue