mirror of
https://github.com/PixelGuys/Cubyz.git
synced 2025-08-03 03:06:55 -04:00
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:
parent
684d154a6d
commit
6811f21682
@ -1,4 +1,5 @@
|
|||||||
const std = @import("std");
|
const std = @import("std");
|
||||||
|
const builtin = @import("builtin");
|
||||||
|
|
||||||
const main = @import("main");
|
const main = @import("main");
|
||||||
const settings = main.settings;
|
const settings = main.settings;
|
||||||
@ -199,6 +200,7 @@ pub const Gamepad = struct {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
pub fn downloadControllerMappings() void {
|
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;
|
var needsDownload: bool = false;
|
||||||
const curTimestamp = std.time.nanoTimestamp();
|
const curTimestamp = std.time.nanoTimestamp();
|
||||||
const timestamp: i128 = blk: {
|
const timestamp: i128 = blk: {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user