chore(ppu): flatten if statement
This commit is contained in:
parent
2586314f9a
commit
1343e8e52e
|
@ -82,15 +82,13 @@ impl Ppu {
|
||||||
self.obj_buffer.clear();
|
self.obj_buffer.clear();
|
||||||
|
|
||||||
self.stat.set_mode(Mode::HBlank);
|
self.stat.set_mode(Mode::HBlank);
|
||||||
} else {
|
} else if self.control.lcd_enabled() {
|
||||||
if self.control.lcd_enabled() {
|
|
||||||
// Only Draw when the LCD Is Enabled
|
// Only Draw when the LCD Is Enabled
|
||||||
self.draw(self.cycles.into());
|
self.draw(self.cycles.into());
|
||||||
} else {
|
} else {
|
||||||
self.reset();
|
self.reset();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
Mode::HBlank => {
|
Mode::HBlank => {
|
||||||
// This mode will always end at 456 cycles
|
// This mode will always end at 456 cycles
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue