From 2c465861e126d5de0c0df3602a0ebd8b5c39d880 Mon Sep 17 00:00:00 2001 From: Brandon Dyck Date: Mon, 10 Jan 2022 10:26:44 -0700 Subject: [PATCH] Clean up debugging stuff --- src/main.zig | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/main.zig b/src/main.zig index 648c01e..6c9bfe6 100644 --- a/src/main.zig +++ b/src/main.zig @@ -108,12 +108,8 @@ const Buffer = struct { } }; -fn handleActive(win: mfb.Window(State), isActive: bool) callconv(.C) void { - win.getUserData().?.*.active = isActive; - var data = win.getUserData(); - if (data) |value| { - value.*.active = isActive; - } +fn handleActive(win: mfb.Window(State), is_active: bool) callconv(.C) void { + win.getUserData().?.*.active = is_active; } fn handleResize(win: mfb.Window(State), width: i32, height: i32) callconv(.C) void { @@ -147,9 +143,7 @@ fn handleMouseButton(_: mfb.Window(State), mouse_button: mfb.MouseButton, key_mo } fn handleMouseMove(win: mfb.Window(State), x: i32, y: i32) callconv(.C) void { - var state = win.getUserData().?; - std.log.debug("cursor={any}", .{state.*.cursor}); - state.*.cursor = .{ .x = x, .y = y }; + win.getUserData().?.*.cursor = .{ .x = x, .y = y }; } pub fn main() !void {