mirror of https://github.com/mgba-emu/mgba.git
OpenGL: Fix fast-forward on some OpenGL drivers where it may block early
This commit is contained in:
parent
fb9db162ea
commit
66dfc251fc
1
CHANGES
1
CHANGES
|
@ -16,6 +16,7 @@ Bugfixes:
|
||||||
- GBA Memory: Fix unaligned out-of-bounds ROM loads
|
- GBA Memory: Fix unaligned out-of-bounds ROM loads
|
||||||
- Qt: Add additional checks in CheatModel to prevent crashes
|
- Qt: Add additional checks in CheatModel to prevent crashes
|
||||||
- GBA Hardware: Fix Game Boy Player rumble in Pokemon Pinball
|
- GBA Hardware: Fix Game Boy Player rumble in Pokemon Pinball
|
||||||
|
- OpenGL: Fix fast-forward on some OpenGL drivers where it may block early
|
||||||
Misc:
|
Misc:
|
||||||
- GBA Audio: Implement missing flags on SOUNDCNT_X register
|
- GBA Audio: Implement missing flags on SOUNDCNT_X register
|
||||||
|
|
||||||
|
|
|
@ -210,10 +210,10 @@ void PainterGL::draw() {
|
||||||
}
|
}
|
||||||
if (GBASyncWaitFrameStart(&m_context->sync, m_context->frameskip) || !m_queue.isEmpty()) {
|
if (GBASyncWaitFrameStart(&m_context->sync, m_context->frameskip) || !m_queue.isEmpty()) {
|
||||||
dequeue();
|
dequeue();
|
||||||
|
GBASyncWaitFrameEnd(&m_context->sync);
|
||||||
m_painter.begin(m_gl->context()->device());
|
m_painter.begin(m_gl->context()->device());
|
||||||
performDraw();
|
performDraw();
|
||||||
m_painter.end();
|
m_painter.end();
|
||||||
GBASyncWaitFrameEnd(&m_context->sync);
|
|
||||||
m_backend.d.swap(&m_backend.d);
|
m_backend.d.swap(&m_backend.d);
|
||||||
} else {
|
} else {
|
||||||
GBASyncWaitFrameEnd(&m_context->sync);
|
GBASyncWaitFrameEnd(&m_context->sync);
|
||||||
|
|
|
@ -64,8 +64,8 @@ void GBASDLGLRunloop(struct GBAThread* context, struct SDLSoftwareRenderer* rend
|
||||||
if (GBASyncWaitFrameStart(&context->sync, context->frameskip)) {
|
if (GBASyncWaitFrameStart(&context->sync, context->frameskip)) {
|
||||||
v->postFrame(v, renderer->d.outputBuffer);
|
v->postFrame(v, renderer->d.outputBuffer);
|
||||||
}
|
}
|
||||||
v->drawFrame(v);
|
|
||||||
GBASyncWaitFrameEnd(&context->sync);
|
GBASyncWaitFrameEnd(&context->sync);
|
||||||
|
v->drawFrame(v);
|
||||||
v->swap(v);
|
v->swap(v);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -117,8 +117,8 @@ void GBASDLGLES2Runloop(struct GBAThread* context, struct SDLSoftwareRenderer* r
|
||||||
if (GBASyncWaitFrameStart(&context->sync, context->frameskip)) {
|
if (GBASyncWaitFrameStart(&context->sync, context->frameskip)) {
|
||||||
v->postFrame(v, renderer->d.outputBuffer);
|
v->postFrame(v, renderer->d.outputBuffer);
|
||||||
}
|
}
|
||||||
v->drawFrame(v);
|
|
||||||
GBASyncWaitFrameEnd(&context->sync);
|
GBASyncWaitFrameEnd(&context->sync);
|
||||||
|
v->drawFrame(v);
|
||||||
#ifdef BUILD_RASPI
|
#ifdef BUILD_RASPI
|
||||||
eglSwapBuffers(renderer->display, renderer->surface);
|
eglSwapBuffers(renderer->display, renderer->surface);
|
||||||
#else
|
#else
|
||||||
|
|
Loading…
Reference in New Issue