all repos — mgba @ 5758964617e3198d7813f92a94c1c11c9c33d6ee

mGBA Game Boy Advance Emulator

Unlock mutex before swapping buffers
Jeffrey Pfau jeffrey@endrift.com
Thu, 16 Jan 2014 00:26:59 -0800
commit

5758964617e3198d7813f92a94c1c11c9c33d6ee

parent

3837213f941a150bc7a3c26c9e38b75f4ef12952

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

jump to
M src/platform/sdl/gl-main.csrc/platform/sdl/gl-main.c

@@ -150,12 +150,9 @@ #else

glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 256, 256, 0, GL_RGBA, GL_UNSIGNED_BYTE, renderer->d.outputBuffer); #endif glDrawArrays(GL_TRIANGLE_FAN, 0, 4); - - SDL_GL_SwapBuffers(); - } else { - usleep(50000); } GBASyncWaitFrameEnd(&context->sync); + SDL_GL_SwapBuffers(); while (SDL_PollEvent(&event)) { GBASDLHandleEvent(context, &event);