Fix regression caused by converting DISPSTAT into a bitfield

This commit is contained in:
Jeffrey Pfau 2014-10-01 23:19:26 -07:00
parent 38e8cc1ee4
commit f9ebe36fac
1 changed files with 2 additions and 1 deletions

View File

@ -157,7 +157,8 @@ int32_t GBAVideoProcessEvents(struct GBAVideo* video, int32_t cycles) {
} }
void GBAVideoWriteDISPSTAT(struct GBAVideo* video, uint16_t value) { void GBAVideoWriteDISPSTAT(struct GBAVideo* video, uint16_t value) {
video->dispstat = value; video->dispstat &= 0x7;
video->dispstat |= value & 0xFFF8;
if (GBARegisterDISPSTATIsVcounterIRQ(video->dispstat)) { if (GBARegisterDISPSTATIsVcounterIRQ(video->dispstat)) {
// FIXME: this can be too late if we're in the middle of an Hblank // FIXME: this can be too late if we're in the middle of an Hblank