mirror of https://github.com/mgba-emu/mgba.git
GB Video: Fix frame-starting callbacks happening too many times
This commit is contained in:
parent
7515238997
commit
d401db77f0
|
@ -155,6 +155,11 @@ int32_t GBVideoProcessEvents(struct GBVideo* video, int32_t cycles) {
|
||||||
GBUpdateIRQs(video->p);
|
GBUpdateIRQs(video->p);
|
||||||
}
|
}
|
||||||
video->renderer->finishFrame(video->renderer);
|
video->renderer->finishFrame(video->renderer);
|
||||||
|
if (video->p->memory.mbcType == GB_MBC7 && video->p->memory.rotation && video->p->memory.rotation->sample) {
|
||||||
|
video->p->memory.rotation->sample(video->p->memory.rotation);
|
||||||
|
}
|
||||||
|
struct mCoreThread* thread = mCoreThreadGet();
|
||||||
|
mCoreThreadFrameStarted(thread);
|
||||||
break;
|
break;
|
||||||
} else if (video->ly == GB_VIDEO_VERTICAL_TOTAL_PIXELS) {
|
} else if (video->ly == GB_VIDEO_VERTICAL_TOTAL_PIXELS) {
|
||||||
video->p->memory.io[REG_LY] = 0;
|
video->p->memory.io[REG_LY] = 0;
|
||||||
|
@ -172,11 +177,6 @@ int32_t GBVideoProcessEvents(struct GBVideo* video, int32_t cycles) {
|
||||||
video->p->memory.io[REG_IF] |= (1 << GB_IRQ_LCDSTAT);
|
video->p->memory.io[REG_IF] |= (1 << GB_IRQ_LCDSTAT);
|
||||||
GBUpdateIRQs(video->p);
|
GBUpdateIRQs(video->p);
|
||||||
}
|
}
|
||||||
if (video->p->memory.mbcType == GB_MBC7 && video->p->memory.rotation && video->p->memory.rotation->sample) {
|
|
||||||
video->p->memory.rotation->sample(video->p->memory.rotation);
|
|
||||||
}
|
|
||||||
struct mCoreThread* thread = mCoreThreadGet();
|
|
||||||
mCoreThreadFrameStarted(thread);
|
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
_cleanOAM(video, video->ly);
|
_cleanOAM(video, video->ly);
|
||||||
|
|
Loading…
Reference in New Issue