diff --git a/src/main.zig b/src/main.zig index aef1814..973d9b7 100644 --- a/src/main.zig +++ b/src/main.zig @@ -172,8 +172,8 @@ pub fn main() void { // Set mouse scaling. ray.SetMouseScale(1.0 / @intToFloat(f32, scale), 1.0 / @intToFloat(f32, scale)); - mouse.pos.x = @intCast(u16, ray.GetMouseX() + camera.x); - mouse.pos.y = @intCast(u16, ray.GetMouseY() + camera.y); + mouse.pos.x = @intCast(Vec2.int_type, ray.GetMouseX()) + camera.x; + mouse.pos.y = @intCast(Vec2.int_type, ray.GetMouseY()) + camera.y; } const left_click: bool = ray.IsMouseButtonPressed(conf.mouse_left_btn);