From 8907104e7c692cef713cd39d835da281a96bbf40 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Fri, 30 Dec 2022 15:22:18 -0800 Subject: [PATCH] comments --- src/Window.zig | 6 +----- src/apprt/glfw.zig | 1 + 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/Window.zig b/src/Window.zig index 0d4d9fb59..f2348a94e 100644 --- a/src/Window.zig +++ b/src/Window.zig @@ -761,10 +761,6 @@ pub fn keyCallback( self.ignore_char = false; if (action == .press or action == .repeat) { - // Convert our glfw input into a platform agnostic trigger. When we - // extract the platform out of this file, we'll pull a lot of this out - // into a function. For now, this is the only place we do it so we just - // put it right here. const trigger: input.Binding.Trigger = .{ .mods = mods, .key = key, @@ -941,7 +937,7 @@ pub fn keyCallback( // Handle non-printables const char: u8 = char: { const mods_int = @bitCast(u8, mods); - const ctrl_only = @bitCast(u8, glfw.Mods{ .control = true }); + const ctrl_only = @bitCast(u8, input.Mods{ .ctrl = true }); // If we're only pressing control, check if this is a character // we convert to a non-printable. diff --git a/src/apprt/glfw.zig b/src/apprt/glfw.zig index 4973ca44f..1a94d17a7 100644 --- a/src/apprt/glfw.zig +++ b/src/apprt/glfw.zig @@ -189,6 +189,7 @@ pub const Window = struct { return self.window.shouldClose(); } + /// Set the title of the window. pub fn setTitle(self: *Window, slice: [:0]const u8) !void { try self.window.setTitle(slice.ptr); }