ref: 977a5eb49ddbaf8f29c708c52a4d484a94398e02
parent: 497adce14b3bfb7096ac2694396076e63dfdb28d
author: Clownacy <Clownacy@users.noreply.github.com>
date: Thu Oct 15 10:25:48 EDT 2020
Add better 3DS audio thread priority
--- a/src/Backends/Audio/3DS.cpp
+++ b/src/Backends/Audio/3DS.cpp
@@ -100,8 +100,18 @@
LightLock_Init(&organya_mutex);
+ s32 priority = 0x30;
+ svcGetThreadPriority(&priority, CUR_THREAD_HANDLE);
+
+ priority -= 1;
+
+ if (priority < 0x18)
+ priority = 0x18;
+ else if (priority > 0x3F)
+ priority = 0x3F;
+
audio_thread_die = false;
- audio_thread = threadCreate(OrganyaThread, NULL, 32 * 1024, 0x18, -1, false);
+ audio_thread = threadCreate(OrganyaThread, NULL, 32 * 1024, priority, -1, false);
return true;
}