mach: App.update will now return !void instead of !bool

In order to close the application, there is already
Engine.setShouldClose() which would roughly do the same thing.
This commit is contained in:
iddev5 2022-06-08 12:44:27 +05:30 committed by Stephen Gutekanst
parent 3234b6c0dd
commit 40c0659cc9
4 changed files with 6 additions and 9 deletions

View file

@ -196,14 +196,14 @@ export fn wasmInit() void {
app.init(&engine) catch {};
}
export fn wasmUpdate() bool {
export fn wasmUpdate() void {
// Poll internal events, like resize
engine.internal.pollChanges();
engine.delta_time_ns = engine.timer.lapPrecise();
engine.delta_time = @intToFloat(f32, engine.delta_time_ns) / @intToFloat(f32, std.time.ns_per_s);
return app.update(&engine) catch false;
app.update(&engine) catch engine.setShouldClose(true);
}
export fn wasmDeinit() void {