This commit is contained in:
Mitchell Hashimoto
2022-12-30 15:22:18 -08:00
parent 71355ada31
commit 8907104e7c
2 changed files with 2 additions and 5 deletions

View File

@ -761,10 +761,6 @@ pub fn keyCallback(
self.ignore_char = false; self.ignore_char = false;
if (action == .press or action == .repeat) { 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 = .{ const trigger: input.Binding.Trigger = .{
.mods = mods, .mods = mods,
.key = key, .key = key,
@ -941,7 +937,7 @@ pub fn keyCallback(
// Handle non-printables // Handle non-printables
const char: u8 = char: { const char: u8 = char: {
const mods_int = @bitCast(u8, mods); 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 // If we're only pressing control, check if this is a character
// we convert to a non-printable. // we convert to a non-printable.

View File

@ -189,6 +189,7 @@ pub const Window = struct {
return self.window.shouldClose(); return self.window.shouldClose();
} }
/// Set the title of the window.
pub fn setTitle(self: *Window, slice: [:0]const u8) !void { pub fn setTitle(self: *Window, slice: [:0]const u8) !void {
try self.window.setTitle(slice.ptr); try self.window.setTitle(slice.ptr);
} }