fix(bus): don't panic on non-existent cartridge

This commit is contained in:
2021-10-28 22:19:38 -03:00
parent 765f9d8288
commit 080c1e7518
3 changed files with 10 additions and 12 deletions

View File

@@ -369,7 +369,7 @@ impl Ppu {
}
}
ToFifoA => {
if let Ok(_) = self.fetch.send_to_fifo(&mut self.fifo) {
if self.fetch.send_to_fifo(&mut self.fifo).is_ok() {
self.fetch.x_pos += 1;
self.fetch.back.state = ToFifoB;
}