mach: do not attempt to import gamemode on non-Linux platforms

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2022-09-08 07:26:46 -07:00
parent c97bcdde0a
commit 9a759c55c5

View file

@ -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() });