chore: add debug keybinds for scheduler capacity + event count

This commit is contained in:
Rekai Nyangadzayi Musuka 2022-10-21 05:12:45 -03:00
parent 78e7c0bc3f
commit 55dada243e
1 changed files with 2 additions and 1 deletions

View File

@ -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 => {},
}
},