From 9a759c55c59c8dfcd521db65de91598c670f0e2f Mon Sep 17 00:00:00 2001 From: Stephen Gutekanst Date: Thu, 8 Sep 2022 07:26:46 -0700 Subject: [PATCH] mach: do not attempt to import gamemode on non-Linux platforms Signed-off-by: Stephen Gutekanst --- src/platform/native.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/platform/native.zig b/src/platform/native.zig index d2563c35..c4517ea4 100644 --- a/src/platform/native.zig +++ b/src/platform/native.zig @@ -208,7 +208,7 @@ pub const Platform = struct { return false; } fn deinitLinuxGamemode(platform: *Platform) void { - if (platform.linux_gamemode_is_active) { + if (builtin.os.tag == .linux and platform.linux_gamemode_is_active) { const gamemode = @import("gamemode"); gamemode.requestEnd() catch |err| { std.log.err("Gamemode error {} -> {s}", .{ err, gamemode.errorString() });