diff options
Diffstat (limited to 'src/main.zig')
-rw-r--r-- | src/main.zig | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main.zig b/src/main.zig index dd071fa..17c4119 100644 --- a/src/main.zig +++ b/src/main.zig @@ -36,6 +36,10 @@ fn handleKey(window: ?*gf.Window.Impl, key: c_int, scancode: c_int, legacy.handleKey(game, key, action, mods); } +fn look(window: ?*gf.Window.Impl, xpos: f64, ypos: f64) callconv(.C) void { + legacy.look(game, xpos, ypos); +} + pub fn main() !void { const loca = try Loca.init(allocator, .{}); defer loca.deinit(); @@ -57,6 +61,7 @@ pub fn main() !void { try window.setInputMode(.sticky_mouse_buttons, true); try window.setInputMode(.sticky_keys, true); try window.setKeyCallback(handleKey); + try window.setCursorPosCallback(look); const device = try al.Device.init(null); defer device.deinit() catch unreachable; |