mirror of https://github.com/mgba-emu/mgba.git
Unlock mutex before swapping buffers
This commit is contained in:
parent
3837213f94
commit
5758964617
|
@ -150,12 +150,9 @@ static void _GBASDLRunloop(struct GBAThread* context, struct GLSoftwareRenderer*
|
||||||
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 256, 256, 0, GL_RGBA, GL_UNSIGNED_BYTE, renderer->d.outputBuffer);
|
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 256, 256, 0, GL_RGBA, GL_UNSIGNED_BYTE, renderer->d.outputBuffer);
|
||||||
#endif
|
#endif
|
||||||
glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
|
glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
|
||||||
|
|
||||||
SDL_GL_SwapBuffers();
|
|
||||||
} else {
|
|
||||||
usleep(50000);
|
|
||||||
}
|
}
|
||||||
GBASyncWaitFrameEnd(&context->sync);
|
GBASyncWaitFrameEnd(&context->sync);
|
||||||
|
SDL_GL_SwapBuffers();
|
||||||
|
|
||||||
while (SDL_PollEvent(&event)) {
|
while (SDL_PollEvent(&event)) {
|
||||||
GBASDLHandleEvent(context, &event);
|
GBASDLHandleEvent(context, &event);
|
||||||
|
|
Loading…
Reference in New Issue