event.Wait to be Poll

This commit is contained in:
cuu
2019-06-21 21:44:54 +08:00
parent df2cc2c931
commit 0833c64b9d
4 changed files with 38 additions and 46 deletions

View File

@@ -347,7 +347,7 @@ func run() int {
running := true
for running {
ev := event.Wait()
ev := event.Poll()
if ev.Type == event.QUIT {
running = false
break
@@ -475,6 +475,8 @@ func run() int {
main_screen.KeyDown(ev)
main_screen.LastKeyDown = everytime_keydown
}
gotime.Sleep(50*gotime.Millisecond)
}
return 0