Skip to content

Commit

Permalink
core: use MACH_BACKEND instead of MACH_CORE_BACKEND env var for selec…
Browse files Browse the repository at this point in the history
…ting linux backend
  • Loading branch information
joshua-holmes committed Oct 11, 2024
1 parent 5e9b3cf commit d18e196
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/Linux.zig
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ pub fn init(
const desired_backend: BackendEnum = blk: {
const backend = std.process.getEnvVarOwned(
linux.allocator,
"MACH_CORE_BACKEND",
"MACH_BACKEND",
) catch |err| switch (err) {
error.EnvironmentVariableNotFound => {
break :blk .wayland;
Expand All @@ -77,7 +77,7 @@ pub fn init(

if (std.ascii.eqlIgnoreCase(backend, "x11")) break :blk .x11;
if (std.ascii.eqlIgnoreCase(backend, "wayland")) break :blk .wayland;
std.debug.panic("mach: unknown MACH_CORE_BACKEND: {s}", .{backend});
std.debug.panic("mach: unknown MACH_BACKEND: {s}", .{backend});
};

// Try to initialize the desired backend, falling back to the other if that one is not supported
Expand Down

0 comments on commit d18e196

Please sign in to comment.