At present, Cxbx's version of SetThreadPriority() is equivalent to a NOP.
SetThreadPriority() sets the priority value for the specified thread. This value, together with the priority class of the thread's process, determines the thread's base priority level.
Dxbx has implemented a pass through to the Ntdll version of SetThreadPriority() for some time. We should support properly, unless compelling reason not to. Errors should also be passed back to the caller.
Dxbx implementation
function XTL_EmuSetThreadPriority
(
hThread: HANDLE;
nPriority: int
): BOOL; stdcall;
// Branch:shogun Revision:0.8.1-Pre2 Translator:Shadow_Tj Done:100
var
bRet: BOOL;
begin
EmuSwapFS(fsWindows);
if MayLog(lfUnit) then
LogBegin('EmuSetThreadPriority').
_(hThread, 'hThread').
_(nPriority, 'nPriority').
LogEnd();
bRet := BOOL(SetThreadPriority(hThread, nPriority)); // marked by cxbx
if bRet = BOOL_FALSE then
EmuWarning('SetThreadPriority Failed!');
// HACK! Commented by cxbx
//Sleep(10);
EmuSwapFS(fsXbox);
Result := bRet;
end;
At present, Cxbx's version of SetThreadPriority() is equivalent to a NOP.
SetThreadPriority() sets the priority value for the specified thread. This value, together with the priority class of the thread's process, determines the thread's base priority level.
Dxbx has implemented a pass through to the Ntdll version of SetThreadPriority() for some time. We should support properly, unless compelling reason not to. Errors should also be passed back to the caller.
Dxbx implementation