mirror of https://github.com/mgba-emu/mgba.git
SDL: Fix software renderer build
This commit is contained in:
parent
232880bb00
commit
cea5864f81
|
@ -93,12 +93,12 @@ void mSDLSWRunloop(struct mSDLRenderer* renderer, void* user) {
|
||||||
SDL_Surface* surface = SDL_GetVideoSurface();
|
SDL_Surface* surface = SDL_GetVideoSurface();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
while (context->state < THREAD_EXITING) {
|
while (mCoreThreadIsActive(context)) {
|
||||||
while (SDL_PollEvent(&event)) {
|
while (SDL_PollEvent(&event)) {
|
||||||
mSDLHandleEvent(context, &renderer->player, &event);
|
mSDLHandleEvent(context, &renderer->player, &event);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mCoreSyncWaitFrameStart(&context->sync)) {
|
if (mCoreSyncWaitFrameStart(&context->impl->sync)) {
|
||||||
#if SDL_VERSION_ATLEAST(2, 0, 0)
|
#if SDL_VERSION_ATLEAST(2, 0, 0)
|
||||||
SDL_UnlockTexture(renderer->sdlTex);
|
SDL_UnlockTexture(renderer->sdlTex);
|
||||||
SDL_RenderCopy(renderer->sdlRenderer, renderer->sdlTex, 0, 0);
|
SDL_RenderCopy(renderer->sdlRenderer, renderer->sdlTex, 0, 0);
|
||||||
|
@ -134,7 +134,7 @@ void mSDLSWRunloop(struct mSDLRenderer* renderer, void* user) {
|
||||||
SDL_LockSurface(surface);
|
SDL_LockSurface(surface);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
mCoreSyncWaitFrameEnd(&context->sync);
|
mCoreSyncWaitFrameEnd(&context->impl->sync);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue