Skip to content
Snippets Groups Projects
Verified Commit f045ea6f authored by João Magalhães's avatar João Magalhães :rocket:
Browse files

refactor: more clippy refactor

parent 2519d732
No related branches found
No related tags found
No related merge requests found
Pipeline #1505 passed
...@@ -56,7 +56,7 @@ impl Cpu { ...@@ -56,7 +56,7 @@ impl Cpu {
half_carry: false, half_carry: false,
carry: false, carry: false,
halted: false, halted: false,
mmu: mmu, mmu,
cycles: 0, cycles: 0,
} }
} }
...@@ -117,14 +117,13 @@ impl Cpu { ...@@ -117,14 +117,13 @@ impl Cpu {
// @todo this is so bad, need to improve this by an order // @todo this is so bad, need to improve this by an order
// of magnitude, to be able to have better performance // of magnitude, to be able to have better performance
if self.halted { if self.halted
if ((self.mmu.ie & 0x01 == 0x01) && self.mmu.ppu().int_vblank()) && (((self.mmu.ie & 0x01 == 0x01) && self.mmu.ppu().int_vblank())
|| ((self.mmu.ie & 0x02 == 0x02) && self.mmu.ppu().int_stat()) || ((self.mmu.ie & 0x02 == 0x02) && self.mmu.ppu().int_stat())
|| ((self.mmu.ie & 0x04 == 0x04) && self.mmu.timer().int_tima()) || ((self.mmu.ie & 0x04 == 0x04) && self.mmu.timer().int_tima())
|| ((self.mmu.ie & 0x10 == 0x10) && self.mmu.pad().int_pad()) || ((self.mmu.ie & 0x10 == 0x10) && self.mmu.pad().int_pad()))
{ {
self.halted = false; self.halted = false;
}
} }
if self.ime { if self.ime {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment