From c5432a93539077177352c1520c33a195ccb8700c Mon Sep 17 00:00:00 2001 From: Stephen Gutekanst Date: Fri, 10 Jun 2022 16:56:40 -0700 Subject: [PATCH] mach: zig fmt Signed-off-by: Stephen Gutekanst --- src/platform/native.zig | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/src/platform/native.zig b/src/platform/native.zig index c50ae90c..e910a499 100644 --- a/src/platform/native.zig +++ b/src/platform/native.zig @@ -495,19 +495,17 @@ pub fn main() !void { const window = engine.internal.window; while (!window.shouldClose()) { if (engine.internal.wait_event_timeout > 0.0) { - // wait for an event - if (engine.internal.wait_event_timeout == std.math.floatMax(f64)) { - // no timeout - try glfw.waitEvents(); - } - else { - // with a timeout - try glfw.waitEventsTimeout(engine.internal.wait_event_timeout); - } - } - else { - // don't wait - try glfw.pollEvents(); + // wait for an event + if (engine.internal.wait_event_timeout == std.math.floatMax(f64)) { + // no timeout + try glfw.waitEvents(); + } else { + // with a timeout + try glfw.waitEventsTimeout(engine.internal.wait_event_timeout); + } + } else { + // don't wait + try glfw.pollEvents(); } engine.delta_time_ns = engine.timer.lapPrecise();