summaryrefslogtreecommitdiff
path: root/src/esp32p4.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-10-22 09:50:43 -0300
committerGabriel Schneider <[email protected]>2026-10-22 10:03:24 -0300
commita8b457a306a4442975210bcac3f04b56513c61c3 (patch)
tree6e2026ecb15da2fb919a0202f5d8b38e3b36a595 /src/esp32p4.zig
parenta8a1499bdffffc5b6919e24ec957e92fabaf003b (diff)
parent7e9d2c4169245072265b483ffaa6aa05f23f08d3 (diff)
downloadpardes-a8b457a306a4442975210bcac3f04b56513c61c3.tar.gz
pardes-a8b457a306a4442975210bcac3f04b56513c61c3.zip
Merge: Def/Refs, the diff viewer, Helix n/N, Callstack, Zig 0.17, Window mode and the terminal cwd fix onto 0.24
The docs keep both sides: 0.24's Ctrl-i fallbacks and typed ls with this line's Window mode, raw Esc and Helix n/N wording. The CHANGELOG's unreleased entries go above 0.24, Def/Refs and the context rows among them. cheatsheet-a4.pdf rendered again; .scratch/ ignored. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/esp32p4.zig')
-rw-r--r--src/esp32p4.zig36
1 files changed, 19 insertions, 17 deletions
diff --git a/src/esp32p4.zig b/src/esp32p4.zig
index 6772e75d..683d19e1 100644
--- a/src/esp32p4.zig
+++ b/src/esp32p4.zig
@@ -134,19 +134,19 @@ pub const GpioFn = *const fn (ctx: ?*anyopaque, pin: u16, was: *u8, now: *u8) ca
var host_alloc: Allocator = undefined;
fn hostAlloc(_: *anyopaque, len: usize, alignment: std.mem.Alignment, _: usize) ?[*]u8 {
- return host_alloc.alloc(host_alloc.ctx, len, @intFromEnum(alignment));
+ return host_alloc.alloc(host_alloc.ctx, len, @backingInt(alignment));
}
fn hostResize(_: *anyopaque, mem: []u8, alignment: std.mem.Alignment, new_len: usize, _: usize) bool {
- return host_alloc.resize(host_alloc.ctx, mem.ptr, mem.len, @intFromEnum(alignment), new_len);
+ return host_alloc.resize(host_alloc.ctx, mem.ptr, mem.len, @backingInt(alignment), new_len);
}
fn hostRemap(_: *anyopaque, mem: []u8, alignment: std.mem.Alignment, new_len: usize, _: usize) ?[*]u8 {
- return if (host_alloc.resize(host_alloc.ctx, mem.ptr, mem.len, @intFromEnum(alignment), new_len)) mem.ptr else null;
+ return if (host_alloc.resize(host_alloc.ctx, mem.ptr, mem.len, @backingInt(alignment), new_len)) mem.ptr else null;
}
fn hostFree(_: *anyopaque, mem: []u8, alignment: std.mem.Alignment, _: usize) void {
- host_alloc.free(host_alloc.ctx, mem.ptr, mem.len, @intFromEnum(alignment));
+ host_alloc.free(host_alloc.ctx, mem.ptr, mem.len, @backingInt(alignment));
}
const host_vtable: std.mem.Allocator.VTable = .{
@@ -447,19 +447,21 @@ fn apply(c: *pardes.Pardes, ev: vaxis.Event) void {
else => null,
};
if (button) |b| {
- c.update(.{ .mouse = .{
- .button = b,
- .kind = switch (m.type) {
- .press => .press,
- .release => .release,
- .motion => .motion,
- .drag => .drag,
+ c.update(.{
+ .mouse = .{
+ .button = b,
+ .kind = switch (m.type) {
+ .press => .press,
+ .release => .release,
+ .motion => .motion,
+ .drag => .drag,
+ },
+ // Before the first cell (a drag past the edge): the edge.
+ .col = @intCast(@max(0, m.col)),
+ .row = @intCast(@max(0, m.row)),
+ .ctrl = m.mods.ctrl,
},
- // Before the first cell (a drag past the edge): the edge.
- .col = @intCast(@max(0, m.col)),
- .row = @intCast(@max(0, m.row)),
- .ctrl = m.mods.ctrl,
- } });
+ });
dirty = true;
}
},
@@ -506,7 +508,7 @@ fn apply(c: *pardes.Pardes, ev: vaxis.Event) void {
c.update(.pointer_leave);
dirty = true;
},
- .focus_in, .mouse_leave => {},
+ .focus_in, .mouse_leave, .cursor_position => {},
// Capability replies. vaxis's own Loop sets these fields directly (`Loop.zig:377-403`);
// with no Loop, this is where they land. DA1 is the terminator: every terminal answers it
// last, so it is the signal that the whole handshake is in and the detected features can be