chore: add debug keybinds for scheduler capacity + event count

This commit is contained in:
Rekai Nyangadzayi Musuka 2022-05-25 15:13:57 -03:00
parent 41ee32b118
commit 697ec46cf1
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_s => io.keyinput.shoulder_r.set(),
SDL.SDLK_RETURN => io.keyinput.start.set(), SDL.SDLK_RETURN => io.keyinput.start.set(),
SDL.SDLK_RSHIFT => io.keyinput.select.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 => {}, else => {},
} }
}, },