core: simplify event iterator

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2024-08-25 16:51:16 -07:00
parent 8b8489b3e2
commit 09d39fb694
13 changed files with 46 additions and 74 deletions

View file

@ -118,9 +118,7 @@ fn tick(
audio: *mach.Audio.Mod,
app: *Mod,
) !void {
// TODO(Core)
var iter = core.state().pollEvents();
while (iter.next()) |event| {
while (core.state().nextEvent()) |event| {
switch (event) {
.key_press => |ev| switch (ev.key) {
.down => {