feat: implement keyboard input

This commit is contained in:
2022-02-01 16:11:59 -04:00
parent f6e4b4931f
commit b07eb22b86
2 changed files with 49 additions and 10 deletions

View File

@@ -19,8 +19,8 @@ pub fn runFrame(sched: *Scheduler, cpu: *Arm7tdmi, bus: *Bus) void {
}
}
pub fn runEmuThread(quit: *Atomic(bool), sched: *Scheduler, cpu: *Arm7tdmi, bus: *Bus) void {
pub fn runEmuThread(quit: *Atomic(bool), pause: *Atomic(bool), sched: *Scheduler, cpu: *Arm7tdmi, bus: *Bus) void {
while (!quit.load(.Unordered)) {
runFrame(sched, cpu, bus);
if (!pause.load(.Unordered)) runFrame(sched, cpu, bus);
}
}