mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-05 19:08:12 +00:00
n3ds: Check that audio thread name starts with "SDLAudioP"
The string has a number after it, so a basic SDL_strcmp() will never match. Reference PR #8346.
This commit is contained in:
@@ -55,7 +55,7 @@ int SDL_SYS_CreateThread(SDL_Thread *thread)
|
|||||||
svcGetThreadPriority(&priority, CUR_THREAD_HANDLE);
|
svcGetThreadPriority(&priority, CUR_THREAD_HANDLE);
|
||||||
|
|
||||||
/* prefer putting audio thread on system core */
|
/* prefer putting audio thread on system core */
|
||||||
if (thread->name && SDL_strcmp(thread->name, "SDLAudioP") == 0 && R_SUCCEEDED(APT_SetAppCpuTimeLimit(30))) {
|
if (thread->name && (SDL_strncmp(thread->name, "SDLAudioP", 9) == 0) && R_SUCCEEDED(APT_SetAppCpuTimeLimit(30))) {
|
||||||
cpu = 1;
|
cpu = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user