chore(ppu): flatten if statement

This commit is contained in:
Rekai Nyangadzayi Musuka 2021-04-24 02:13:56 -05:00
parent 2586314f9a
commit 1343e8e52e
1 changed files with 4 additions and 6 deletions

View File

@ -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