Skip to content

Commit

Permalink
bugfix: Properly handle VCOUNT interrupt edge case for line 227.
Browse files Browse the repository at this point in the history
fixes #97
  • Loading branch information
michelhe committed May 20, 2020
1 parent 9826b62 commit ccb7b49
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions rustboyadvance-core/src/gpu/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -496,9 +496,8 @@ impl Gpu {
};
}
VBlankHBlank => {
self.update_vcount(self.vcount + 1, irqs);

if self.vcount < DISPLAY_HEIGHT + VBLANK_LINES - 1 {
self.update_vcount(self.vcount + 1, irqs);
self.dispstat.set_hblank_flag(false);
self.cycles_left_for_current_state = CYCLES_HDRAW;
self.state = VBlankHDraw;
Expand Down

0 comments on commit ccb7b49

Please sign in to comment.