From 6811f2168215873053767988ed6463b6a60b4f6b Mon Sep 17 00:00:00 2001 From: IntegratedQuantum Date: Sun, 13 Jul 2025 21:46:00 +0200 Subject: [PATCH] Don't fetch controller mappings in debug mode, decreasing compile-time by 5 seconds (25%) see also: https://github.com/ziglang/zig/issues/24435 --- src/graphics/Window.zig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/graphics/Window.zig b/src/graphics/Window.zig index ffb61d10..5e0f3b39 100644 --- a/src/graphics/Window.zig +++ b/src/graphics/Window.zig @@ -1,4 +1,5 @@ const std = @import("std"); +const builtin = @import("builtin"); const main = @import("main"); const settings = main.settings; @@ -199,6 +200,7 @@ pub const Gamepad = struct { } }; pub fn downloadControllerMappings() void { + if(builtin.mode == .Debug) return; // TODO: The http fetch adds ~5 seconds to the compile time, so it's disabled in debug mode, see #24435 var needsDownload: bool = false; const curTimestamp = std.time.nanoTimestamp(); const timestamp: i128 = blk: {