feat: update to new render-request API
This commit is contained in:
parent
a65f559eac
commit
22c36f6a47
1 changed files with 4 additions and 2 deletions
|
@ -28,11 +28,11 @@ pub fn init() void {
|
|||
|
||||
var event_heap: [1024 * 128]u8 = undefined;
|
||||
var event_fba = std.heap.FixedBufferAllocator.init(&event_heap);
|
||||
pub fn update() void {
|
||||
pub fn update() bool {
|
||||
defer event_fba.end_index = 0;
|
||||
var ev = zz.getEvent(event_fba.allocator()) catch |e| {
|
||||
std.log.err("Failed to deserialize event: {}", .{e});
|
||||
return;
|
||||
return false;
|
||||
};
|
||||
|
||||
switch (ev.data) {
|
||||
|
@ -40,9 +40,11 @@ pub fn update() void {
|
|||
mode = info.mode;
|
||||
pal = info.style.colors;
|
||||
keymap.populate(info.keybinds);
|
||||
return true;
|
||||
},
|
||||
else => {},
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
fn tryRender(cols: usize) !void {
|
||||
|
|
Loading…
Reference in a new issue