Don't fetch controller mappings in debug mode, decreasing compile-time by 5 seconds (25%)

see also: https://github.com/ziglang/zig/issues/24435
This commit is contained in:
IntegratedQuantum 2025-07-13 21:46:00 +02:00
parent 684d154a6d
commit 6811f21682

View File

@ -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: {