n3ds: Don't put audio thread in system core on Old 3DS systems

This commit is contained in:
NateXS
2026-02-16 08:34:08 -06:00
committed by Sam Lantinga
parent 225fb12ae1
commit 149abe8f85

View File

@@ -42,7 +42,6 @@ static void ThreadEntry(void *arg)
threadExit(0); threadExit(0);
} }
bool SDL_SYS_CreateThread(SDL_Thread *thread, bool SDL_SYS_CreateThread(SDL_Thread *thread,
SDL_FunctionPointer pfnBeginThread, SDL_FunctionPointer pfnBeginThread,
SDL_FunctionPointer pfnEndThread) SDL_FunctionPointer pfnEndThread)
@@ -53,9 +52,13 @@ bool SDL_SYS_CreateThread(SDL_Thread *thread,
svcGetThreadPriority(&priority, CUR_THREAD_HANDLE); svcGetThreadPriority(&priority, CUR_THREAD_HANDLE);
// prefer putting audio thread on system core // on New 3DS, prefer putting audio thread on system core
if (thread->name && (SDL_strncmp(thread->name, "SDLAudioP", 9) == 0) && R_SUCCEEDED(APT_SetAppCpuTimeLimit(30))) { if (thread->name && (SDL_strncmp(thread->name, "SDLAudioP", 9) == 0)) {
cpu = 1; bool new3ds = false;
APT_CheckNew3DS(&new3ds);
if (new3ds && R_SUCCEEDED(APT_SetAppCpuTimeLimit(30))) {
cpu = 1;
}
} }
thread->handle = threadCreate(ThreadEntry, thread->handle = threadCreate(ThreadEntry,