From 55dada243e699593d137b88a6d3e5611e21fc1ea Mon Sep 17 00:00:00 2001 From: Rekai Musuka Date: Fri, 21 Oct 2022 05:12:45 -0300 Subject: [PATCH] chore: add debug keybinds for scheduler capacity + event count --- src/main.zig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main.zig b/src/main.zig index 4034073..58dd840 100644 --- a/src/main.zig +++ b/src/main.zig @@ -155,7 +155,8 @@ pub fn main() anyerror!void { SDL.SDLK_s => io.keyinput.shoulder_r.set(), SDL.SDLK_RETURN => io.keyinput.start.set(), SDL.SDLK_RSHIFT => io.keyinput.select.set(), - SDL.SDLK_i => std.debug.print("{} samples\n", .{@intCast(u32, SDL.SDL_AudioStreamAvailable(cpu.bus.apu.stream)) / (2 * @sizeOf(u16))}), + SDL.SDLK_i => log.err("Sample Count: {}", .{@intCast(u32, SDL.SDL_AudioStreamAvailable(cpu.bus.apu.stream)) / (2 * @sizeOf(u16))}), + SDL.SDLK_j => log.err("Scheduler Capacity: {} | Scheduler Event Count: {}", .{ scheduler.queue.capacity(), scheduler.queue.count() }), else => {}, } },