From 8f8f0757af8ef377cf9f5a159d259de39ce8661d Mon Sep 17 00:00:00 2001 From: georgemoralis Date: Sun, 12 Nov 2023 15:09:18 +0200 Subject: [PATCH] fixed issue in scePthreadAttrSetschedpolicy --- src/core/hle/libraries/libkernel/thread_management.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/core/hle/libraries/libkernel/thread_management.cpp b/src/core/hle/libraries/libkernel/thread_management.cpp index 330b4b9b..3930c66b 100644 --- a/src/core/hle/libraries/libkernel/thread_management.cpp +++ b/src/core/hle/libraries/libkernel/thread_management.cpp @@ -110,10 +110,12 @@ int PS4_SYSV_ABI scePthreadAttrSetschedpolicy(ScePthreadAttr* attr, int policy) } int ppolicy = SCHED_OTHER; // winpthreads only supports SCHED_OTHER - + if (policy != SCHED_OTHER) { + LOG_TRACE_IF(log_pthread_file, "scePthreadAttrSetschedpolicy policy={} not supported by winpthreads\n", policy); + } (*attr)->policy = policy; - int result = pthread_attr_setschedpolicy(&(*attr)->pth_attr, policy); + int result = pthread_attr_setschedpolicy(&(*attr)->pth_attr, ppolicy); return result == 0 ? SCE_OK : SCE_KERNEL_ERROR_EINVAL; }