mirror of
https://github.com/zoriya/zig-wayland.git
synced 2026-06-05 03:31:21 +00:00
examples: Fix compilation
This commit is contained in:
+1
-1
@@ -7,7 +7,7 @@ pub fn main() !void {
|
||||
const registry = try display.getRegistry();
|
||||
var foo: u32 = 42;
|
||||
registry.setListener(*u32, listener, &foo);
|
||||
_ = try display.roundtrip();
|
||||
if (display.roundtrip() != .SUCCESS) return error.RoundtripFailed;
|
||||
}
|
||||
|
||||
fn listener(_: *wl.Registry, event: wl.Registry.Event, data: *u32) void {
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@ pub fn main() !void {
|
||||
var running: bool = true;
|
||||
registry.setListener(*bool, listener, &running);
|
||||
while (running) {
|
||||
_ = try display.dispatch();
|
||||
if (display.roundtrip() != .SUCCESS) return error.RoundtripFailed;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user