build: update to Zig 0.11.0
This commit is contained in:
@ -110,10 +110,10 @@ fn _main() !void {
|
||||
fn registryListener(registry: *wl.Registry, event: wl.Registry.Event, globals: *Globals) void {
|
||||
switch (event) {
|
||||
.global => |global| {
|
||||
if (std.cstr.cmp(global.interface, wl.Seat.getInterface().name) == 0) {
|
||||
if (mem.orderZ(u8, global.interface, wl.Seat.getInterface().name) == .eq) {
|
||||
assert(globals.seat == null); // TODO: support multiple seats
|
||||
globals.seat = registry.bind(global.name, wl.Seat, 1) catch @panic("out of memory");
|
||||
} else if (std.cstr.cmp(global.interface, zriver.ControlV1.getInterface().name) == 0) {
|
||||
} else if (mem.orderZ(u8, global.interface, zriver.ControlV1.getInterface().name) == .eq) {
|
||||
globals.control = registry.bind(global.name, zriver.ControlV1, 1) catch @panic("out of memory");
|
||||
}
|
||||
},
|
||||
@ -132,7 +132,7 @@ fn callbackListener(_: *zriver.CommandCallbackV1, event: zriver.CommandCallbackV
|
||||
},
|
||||
.failure => |failure| {
|
||||
// A small hack to provide usage text when river reports an unknown command.
|
||||
if (std.cstr.cmp(failure.failure_message, "unknown command") == 0) {
|
||||
if (mem.orderZ(u8, failure.failure_message, "unknown command") == .eq) {
|
||||
std.log.err("unknown command", .{});
|
||||
io.getStdErr().writeAll(usage) catch {};
|
||||
os.exit(1);
|
||||
|
Reference in New Issue
Block a user