You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
722B

  1. diff --git a/modules/juce_core/native/juce_posix_SharedCode.h b/modules/juce_core/native/juce_posix_SharedCode.h
  2. index 13724ba7c..f8892081c 100644
  3. --- a/modules/juce_core/native/juce_posix_SharedCode.h
  4. +++ b/modules/juce_core/native/juce_posix_SharedCode.h
  5. @@ -989,7 +989,11 @@ bool Thread::setThreadPriority (void* handle, int priority)
  6. if (pthread_getschedparam ((pthread_t) handle, &policy, &param) != 0)
  7. return false;
  8. + #if JUCE_LINUX
  9. + policy = priority < 9 ? SCHED_OTHER : SCHED_RR;
  10. + #else
  11. policy = priority == 0 ? SCHED_OTHER : SCHED_RR;
  12. + #endif
  13. const int minPriority = sched_get_priority_min (policy);
  14. const int maxPriority = sched_get_priority_max (policy);