Fix running core.step when receiving an event while not waiting

When `time_to_wake` was <= 0, so when a coroutine needed to be executed 
as soon as possible, we didn't check for events, so we only performed a 
`core.step` with the blink timer.
This resulted in jerky reactions to input.
This commit is contained in:
Guldoman authored and takase1121 committed 2023-11-29 09:41:55 +08:00
1 parent 3bf3266ca5
commit 6cd1f96234
2 files changed
+4 -4

No files matched your search

+3 -3
View File
@@ -61,10 +61,10 @@ function system.poll_event() end
---
---Wait until an event is triggered.
---
---@param timeout number Amount of seconds, also supports fractions
---of a second, eg: 0.01
---@param timeout? number Amount of seconds, also supports fractions
---of a second, eg: 0.01. If not provided, waits forever.
---
---@return boolean status True on success or false if there was an error.
---@return boolean status True on success or false if there was an error or if no event was received.
function system.wait_event(timeout) end
---