aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/helpers.c
diff options
context:
space:
mode:
Diffstat (limited to 'Alc/helpers.c')
-rw-r--r--Alc/helpers.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/Alc/helpers.c b/Alc/helpers.c
index f6c05a47..fab8209a 100644
--- a/Alc/helpers.c
+++ b/Alc/helpers.c
@@ -235,28 +235,20 @@ void al_print(const char *fname, unsigned int line, const char *fmt, ...)
void SetRTPriority(void)
{
- ALboolean failed;
+ ALboolean failed = AL_FALSE;
#ifdef _WIN32
if(RTPrioLevel > 0)
failed = !SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_TIME_CRITICAL);
- else
- failed = !SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_NORMAL);
#elif defined(HAVE_PTHREAD_SETSCHEDPARAM) && !defined(__OpenBSD__)
- struct sched_param param;
-
if(RTPrioLevel > 0)
{
+ struct sched_param param;
/* Use the minimum real-time priority possible for now (on Linux this
* should be 1 for SCHED_RR) */
param.sched_priority = sched_get_priority_min(SCHED_RR);
failed = !!pthread_setschedparam(pthread_self(), SCHED_RR, &param);
}
- else
- {
- param.sched_priority = 0;
- failed = !!pthread_setschedparam(pthread_self(), SCHED_OTHER, &param);
- }
#else
/* Real-time priority not available */
failed = (RTPrioLevel>0);