mirror of https://github.com/mgba-emu/mgba.git
GB: mVL-related fixes
This commit is contained in:
parent
00e8b9877f
commit
ff735e35b7
|
@ -984,6 +984,7 @@ static void _GBVLPStartFrameCallback(void *context) {
|
||||||
GBVideoProxyRendererUnshim(&gb->video, &gbcore->proxyRenderer);
|
GBVideoProxyRendererUnshim(&gb->video, &gbcore->proxyRenderer);
|
||||||
mVideoLogContextRewind(gbcore->logContext, core);
|
mVideoLogContextRewind(gbcore->logContext, core);
|
||||||
GBVideoProxyRendererShim(&gb->video, &gbcore->proxyRenderer);
|
GBVideoProxyRendererShim(&gb->video, &gbcore->proxyRenderer);
|
||||||
|
gb->earlyExit = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -999,6 +1000,7 @@ static bool _GBVLPInit(struct mCore* core) {
|
||||||
gbcore->logCallbacks.videoFrameStarted = _GBVLPStartFrameCallback;
|
gbcore->logCallbacks.videoFrameStarted = _GBVLPStartFrameCallback;
|
||||||
gbcore->logCallbacks.context = core;
|
gbcore->logCallbacks.context = core;
|
||||||
core->addCoreCallbacks(core, &gbcore->logCallbacks);
|
core->addCoreCallbacks(core, &gbcore->logCallbacks);
|
||||||
|
core->videoLogger = gbcore->proxyRenderer.logger;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -343,19 +343,19 @@ void _updateFrameCount(struct mTiming* timing, void* context, uint32_t cyclesLat
|
||||||
mTimingSchedule(timing, &video->frameEvent, 4 - ((video->p->cpu->executionState + 1) & 3));
|
mTimingSchedule(timing, &video->frameEvent, 4 - ((video->p->cpu->executionState + 1) & 3));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (!GBRegisterLCDCIsEnable(video->p->memory.io[REG_LCDC])) {
|
||||||
|
mTimingSchedule(timing, &video->frameEvent, GB_VIDEO_TOTAL_LENGTH);
|
||||||
|
}
|
||||||
|
|
||||||
GBFrameEnded(video->p);
|
|
||||||
mCoreSyncPostFrame(video->p->sync);
|
|
||||||
--video->frameskipCounter;
|
--video->frameskipCounter;
|
||||||
if (video->frameskipCounter < 0) {
|
if (video->frameskipCounter < 0) {
|
||||||
video->renderer->finishFrame(video->renderer);
|
video->renderer->finishFrame(video->renderer);
|
||||||
video->frameskipCounter = video->frameskip;
|
video->frameskipCounter = video->frameskip;
|
||||||
}
|
}
|
||||||
|
GBFrameEnded(video->p);
|
||||||
|
mCoreSyncPostFrame(video->p->sync);
|
||||||
++video->frameCounter;
|
++video->frameCounter;
|
||||||
|
|
||||||
if (!GBRegisterLCDCIsEnable(video->p->memory.io[REG_LCDC])) {
|
|
||||||
mTimingSchedule(timing, &video->frameEvent, GB_VIDEO_TOTAL_LENGTH);
|
|
||||||
}
|
|
||||||
GBFrameStarted(video->p);
|
GBFrameStarted(video->p);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue