shithub: cstory

Download patch

ref: 35d3d20d44734c64e97996e9f9027accfebce89f
parent: 977a5eb49ddbaf8f29c708c52a4d484a94398e02
author: Clownacy <Clownacy@users.noreply.github.com>
date: Thu Oct 15 10:27:16 EDT 2020

Even better way

--- a/src/Backends/Audio/3DS.cpp
+++ b/src/Backends/Audio/3DS.cpp
@@ -103,12 +103,7 @@
 	s32 priority = 0x30;
 	svcGetThreadPriority(&priority, CUR_THREAD_HANDLE);
 
-	priority -= 1;
-
-	if (priority < 0x18)
-		priority = 0x18;
-	else if (priority > 0x3F)
-		priority = 0x3F;
+	priority = CLAMP(priority - 1, 0x18, 0x3F);
 
 	audio_thread_die = false;
 	audio_thread = threadCreate(OrganyaThread, NULL, 32 * 1024, priority, -1, false);