mirror of
https://github.com/Ryujinx/libsoundio.git
synced 2025-03-05 18:59:55 +00:00
windows: attempt high priority only when asked for it
This commit is contained in:
parent
f57f691068
commit
1738edeaf9
|
@ -210,9 +210,11 @@ int soundio_os_thread_create(
|
||||||
soundio_os_thread_destroy(thread);
|
soundio_os_thread_destroy(thread);
|
||||||
return SoundIoErrorSystemResources;
|
return SoundIoErrorSystemResources;
|
||||||
}
|
}
|
||||||
|
if (high_priority) {
|
||||||
if (!SetThreadPriority(thread->handle, THREAD_PRIORITY_TIME_CRITICAL)) {
|
if (!SetThreadPriority(thread->handle, THREAD_PRIORITY_TIME_CRITICAL)) {
|
||||||
win32_panic("unable to set high priority thread: %s"); // TODO don't panic
|
win32_panic("unable to set high priority thread: %s"); // TODO don't panic
|
||||||
}
|
}
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
int err;
|
int err;
|
||||||
if ((err = pthread_attr_init(&thread->attr))) {
|
if ((err = pthread_attr_init(&thread->attr))) {
|
||||||
|
|
Loading…
Reference in a new issue