diff --git a/src/core/kernel/exports/EmuKrnlKe.cpp b/src/core/kernel/exports/EmuKrnlKe.cpp index 3bfd5ebc9..d26c7dd89 100644 --- a/src/core/kernel/exports/EmuKrnlKe.cpp +++ b/src/core/kernel/exports/EmuKrnlKe.cpp @@ -1379,7 +1379,7 @@ XBSYSAPI EXPORTNUM(124) xbox::long_xt NTAPI xbox::KeQueryBasePriorityThread KiLockDispatcherDatabase(&OldIrql); // It cannot fail because all thread handles are created by ob - const auto& nativeHandle = GetNativeHandle(PspGetCurrentThread()->UniqueThread); + const auto& nativeHandle = GetNativeHandle(reinterpret_cast(Thread)->UniqueThread); long_xt ret = GetThreadPriority(*nativeHandle); KiUnlockDispatcherDatabase(OldIrql); @@ -1806,7 +1806,7 @@ XBSYSAPI EXPORTNUM(143) xbox::long_xt NTAPI xbox::KeSetBasePriorityThread KiLockDispatcherDatabase(&oldIRQL); // It cannot fail because all thread handles are created by ob - const auto &nativeHandle = GetNativeHandle(PspGetCurrentThread()->UniqueThread); + const auto &nativeHandle = GetNativeHandle(reinterpret_cast(Thread)->UniqueThread); LONG ret = GetThreadPriority(*nativeHandle); // This would work normally, but it will slow down the emulation,