Skip to content

Commit fb31e3f

Browse files
committed
Run iOS guest off main thread
1 parent a0b0ee8 commit fb31e3f

2 files changed

Lines changed: 16 additions & 2 deletions

File tree

UnleashedRecomp/main.cpp

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ int main(int argc, char *argv[])
214214
os::logger::Init();
215215

216216
#ifdef UNLEASHED_RECOMP_IOS
217-
LOGN("iOS startup build: sync-wait-fix-v4");
217+
LOGN("iOS startup build: threaded-guest-v5");
218218
#endif
219219

220220
PreloadContext preloadContext;
@@ -406,8 +406,22 @@ int main(int argc, char *argv[])
406406
LOGN("Starting pipeline precompilation.");
407407
Video::StartPipelinePrecompilation();
408408

409+
#ifdef UNLEASHED_RECOMP_IOS
410+
LOGFN("Starting guest worker thread at 0x{:08X}", entry);
411+
GuestThread::Start({ entry, 0, 0 }, nullptr);
412+
413+
LOGN("Entering iOS SDL event pump.");
414+
while (true)
415+
{
416+
SDL_PumpEvents();
417+
SDL_FlushEvents(SDL_FIRSTEVENT, SDL_LASTEVENT);
418+
GameWindow::Update();
419+
SDL_Delay(1);
420+
}
421+
#else
409422
LOGFN("Starting guest thread at 0x{:08X}", entry);
410423
GuestThread::Start({ entry, 0, 0 });
424+
#endif
411425

412426
return 0;
413427
}

UnleashedRecomp/res/version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
VERSION_MILESTONE=""
22
VERSION_MAJOR=1
33
VERSION_MINOR=0
4-
VERSION_REVISION=6
4+
VERSION_REVISION=7

0 commit comments

Comments
 (0)