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