Fixed emscripten and iOS builds

main
Sam Lantinga 2023-11-08 14:14:41 -08:00
parent 02f356439d
commit b5347c3364
2 changed files with 2 additions and 2 deletions

View File

@ -26,7 +26,7 @@
static void EmscriptenInternalMainloop(void) static void EmscriptenInternalMainloop(void)
{ {
const int rc = SDL_IterateMainCallbacks(); const int rc = SDL_IterateMainCallbacks(SDL_TRUE);
if (rc != 0) { if (rc != 0) {
SDL_QuitMainCallbacks(); SDL_QuitMainCallbacks();
emscripten_cancel_main_loop(); // kill" the mainloop, so it stops calling back into it. emscripten_cancel_main_loop(); // kill" the mainloop, so it stops calling back into it.

View File

@ -47,7 +47,7 @@ static SDLIosMainCallbacksDisplayLink *globalDisplayLink;
- (void)appIteration:(CADisplayLink *)sender - (void)appIteration:(CADisplayLink *)sender
{ {
const int rc = SDL_IterateMainCallbacks(); const int rc = SDL_IterateMainCallbacks(SDL_TRUE);
if (rc != 0) { if (rc != 0) {
[self.displayLink invalidate]; [self.displayLink invalidate];
self.displayLink = nil; self.displayLink = nil;