chore: introduce zba-util

In an effort to reuse code between zba and zba-gdbstub, move common util
code (like the SPSC Channel I implemented in this commit) in a new lib
This commit is contained in:
2023-03-10 00:05:31 -06:00
parent 72b702cb21
commit 11eae091db
19 changed files with 28 additions and 128 deletions

View File

@@ -11,7 +11,7 @@ const emu = @import("core/emu.zig");
const Gui = @import("platform.zig").Gui;
const Arm7tdmi = @import("core/cpu.zig").Arm7tdmi;
const RingBuffer = @import("util.zig").RingBuffer;
const RingBuffer = @import("zba-util").RingBuffer;
const Allocator = std.mem.Allocator;
const GLuint = gl.GLuint;
@@ -43,7 +43,7 @@ pub const State = struct {
pub fn deinit(self: *@This(), allocator: Allocator) void {
allocator.free(self.title);
self.fps_hist.deinit(allocator);
allocator.free(self.fps_hist.buf);
self.* = undefined;
}