all repos — mgba @ d401db77f0a89d9b2a62ce9aa376032a889de5a3

mGBA Game Boy Advance Emulator

GB Video: Fix frame-starting callbacks happening too many times
Jeffrey Pfau jeffrey@endrift.com
Mon, 29 Aug 2016 00:17:03 -0700
commit

d401db77f0a89d9b2a62ce9aa376032a889de5a3

parent

751523899763b7d5aa46c538c3e306d0c927485e

1 files changed, 5 insertions(+), 5 deletions(-)

jump to
M src/gb/video.csrc/gb/video.c

@@ -155,6 +155,11 @@ video->p->memory.io[REG_IF] |= (1 << GB_IRQ_LCDSTAT);

GBUpdateIRQs(video->p); } 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; } else if (video->ly == GB_VIDEO_VERTICAL_TOTAL_PIXELS) { video->p->memory.io[REG_LY] = 0;

@@ -172,11 +177,6 @@ if (GBRegisterSTATIsLYCIRQ(video->stat) && lyc == video->p->memory.io[REG_LY]) {

video->p->memory.io[REG_IF] |= (1 << GB_IRQ_LCDSTAT); 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; case 2: _cleanOAM(video, video->ly);