Tick agnes before drawing each screen, but no faster.

This commit is contained in:
Toby Jaffey 2025-12-15 00:59:27 +00:00
parent 035608b04a
commit 4741900562

View file

@ -75,6 +75,11 @@ fn submain() !void {
agnes.agnes_set_input(ag, &ag_input, 0);
while(true) {
checkKeys();
var new_frame:bool = false;
_ = agnes.agnes_tick(ag, &new_frame);
if (new_frame) {
if (!agnes.agnes_next_frame(ag)) {
try console.print("Next frame failed!\n", .{});
try console.flush();
@ -90,10 +95,9 @@ fn submain() !void {
}
}
checkKeys();
uvm.render(@ptrCast(&gfxFramebuffer), WIDTH * HEIGHT * 4);
}
}
}
export fn main() void {