Commit 073d7212 authored by Dan Kegel's avatar Dan Kegel Committed by Alexandre Julliard

kernel32: Make SetThreadPriorityBoost return success.

parent 90a9698f
...@@ -713,22 +713,22 @@ static VOID test_thread_priority(void) ...@@ -713,22 +713,22 @@ static VOID test_thread_priority(void)
0,curthreadId); 0,curthreadId);
ok(access_thread!=NULL,"OpenThread returned an invalid handle\n"); ok(access_thread!=NULL,"OpenThread returned an invalid handle\n");
if (access_thread!=NULL) { if (access_thread!=NULL) {
obey_ar(pSetThreadPriorityBoost(access_thread,1)==0); todo_wine obey_ar(pSetThreadPriorityBoost(access_thread,1)==0);
todo_wine obey_ar(pGetThreadPriorityBoost(access_thread,&disabled)==0); todo_wine obey_ar(pGetThreadPriorityBoost(access_thread,&disabled)==0);
ok(CloseHandle(access_thread),"Error Closing thread handle\n"); ok(CloseHandle(access_thread),"Error Closing thread handle\n");
} }
} }
todo_wine {
rc = pSetThreadPriorityBoost(curthread,1); rc = pSetThreadPriorityBoost(curthread,1);
ok( rc != 0, "error=%d\n",GetLastError()); ok( rc != 0, "error=%d\n",GetLastError());
todo_wine {
rc=pGetThreadPriorityBoost(curthread,&disabled); rc=pGetThreadPriorityBoost(curthread,&disabled);
ok(rc!=0 && disabled==1, ok(rc!=0 && disabled==1,
"rc=%d error=%d disabled=%d\n",rc,GetLastError(),disabled); "rc=%d error=%d disabled=%d\n",rc,GetLastError(),disabled);
}
rc = pSetThreadPriorityBoost(curthread,0); rc = pSetThreadPriorityBoost(curthread,0);
ok( rc != 0, "error=%d\n",GetLastError()); ok( rc != 0, "error=%d\n",GetLastError());
}
rc=pGetThreadPriorityBoost(curthread,&disabled); rc=pGetThreadPriorityBoost(curthread,&disabled);
ok(rc!=0 && disabled==0, ok(rc!=0 && disabled==0,
"rc=%d error=%d disabled=%d\n",rc,GetLastError(),disabled); "rc=%d error=%d disabled=%d\n",rc,GetLastError(),disabled);
......
...@@ -357,18 +357,14 @@ BOOL WINAPI GetThreadPriorityBoost( ...@@ -357,18 +357,14 @@ BOOL WINAPI GetThreadPriorityBoost(
/********************************************************************** /**********************************************************************
* SetThreadPriorityBoost [KERNEL32.@] Sets priority boost for thread. * SetThreadPriorityBoost [KERNEL32.@] Sets priority boost for thread.
* *
* Priority boost is not implemented. This function always returns * Priority boost is not implemented, but we return TRUE
* FALSE and sets last error to ERROR_CALL_NOT_IMPLEMENTED * anyway because some games crash otherwise.
*
* RETURNS
* Always returns FALSE to indicate a failure
*/ */
BOOL WINAPI SetThreadPriorityBoost( BOOL WINAPI SetThreadPriorityBoost(
HANDLE hthread, /* [in] Handle to thread */ HANDLE hthread, /* [in] Handle to thread */
BOOL disable) /* [in] TRUE to disable priority boost */ BOOL disable) /* [in] TRUE to disable priority boost */
{ {
SetLastError(ERROR_CALL_NOT_IMPLEMENTED); return TRUE;
return FALSE;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment