SDL: Fix compilation with OpenGL ES 2

This commit is contained in:
Cameron Cawley 2018-01-29 17:25:40 +00:00 committed by endrift
parent f039234055
commit 4f8fe384b3
1 changed files with 3 additions and 3 deletions

View File

@ -123,15 +123,15 @@ void mSDLGLES2Runloop(struct mSDLRenderer* renderer, void* user) {
SDL_Event event;
struct VideoBackend* v = &renderer->gl2.d;
while (context->state < THREAD_EXITING) {
while (mCoreThreadIsActive(context)) {
while (SDL_PollEvent(&event)) {
mSDLHandleEvent(context, &renderer->player, &event);
}
if (mCoreSyncWaitFrameStart(&context->sync)) {
if (mCoreSyncWaitFrameStart(&context->impl->sync)) {
v->postFrame(v, renderer->outputBuffer);
}
mCoreSyncWaitFrameEnd(&context->sync);
mCoreSyncWaitFrameEnd(&context->impl->sync);
v->drawFrame(v);
#ifdef BUILD_RASPI
eglSwapBuffers(renderer->display, renderer->surface);