From 4fca5c7007445e5d02183c4d45045a33d92f649a Mon Sep 17 00:00:00 2001 From: ergo720 <45463469+ergo720@users.noreply.github.com> Date: Wed, 15 Mar 2023 00:09:50 +0100 Subject: [PATCH] Hack: <= thread priority instead of >= --- src/core/kernel/exports/EmuKrnlKe.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/kernel/exports/EmuKrnlKe.cpp b/src/core/kernel/exports/EmuKrnlKe.cpp index 79fa6c8e2..49a83e273 100644 --- a/src/core/kernel/exports/EmuKrnlKe.cpp +++ b/src/core/kernel/exports/EmuKrnlKe.cpp @@ -1801,7 +1801,7 @@ XBSYSAPI EXPORTNUM(143) xbox::long_xt NTAPI xbox::KeSetBasePriorityThread // too to wait on the vblank kevent. When the vblank does occur, this other thread will satisfy the wait first, and set the kevent back to non-signalled. Thus, the other // thread will miss the signal because typically, Windows won't re-schedule it after many more vblank have already occured. The proper solution is to boost the priority of // the thread when the kevent is signalled, with the increment argument specified in KeSetEvent. Such boosts should also be appiled whenever a thread satisfies a wait. - if (Priority >= THREAD_PRIORITY_NORMAL) { + if (Priority <= THREAD_PRIORITY_NORMAL) { BOOL result = SetThreadPriority(*nativeHandle, Priority); if (!result) { EmuLog(LOG_LEVEL::WARNING, "SetThreadPriority failed: %s", WinError2Str().c_str());