Dan Kegel : kernel32: Make SetThreadPriorityBoost return success.
Alexandre Julliard
julliard at winehq.org
Tue May 28 15:16:59 CDT 2013
Module: wine
Branch: master
Commit: 073d7212a765ec5c4eff3fbf0ebe553462892fa4
URL: http://source.winehq.org/git/wine.git/?a=commit;h=073d7212a765ec5c4eff3fbf0ebe553462892fa4
Author: Dan Kegel <dank at kegel.com>
Date: Mon May 27 17:08:05 2013 -0700
kernel32: Make SetThreadPriorityBoost return success.
---
dlls/kernel32/tests/thread.c | 12 ++++++------
dlls/kernel32/thread.c | 10 +++-------
2 files changed, 9 insertions(+), 13 deletions(-)
diff --git a/dlls/kernel32/tests/thread.c b/dlls/kernel32/tests/thread.c
index 55014f8..9be0484 100644
--- a/dlls/kernel32/tests/thread.c
+++ b/dlls/kernel32/tests/thread.c
@@ -713,22 +713,22 @@ static VOID test_thread_priority(void)
0,curthreadId);
ok(access_thread!=NULL,"OpenThread returned an invalid handle\n");
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);
ok(CloseHandle(access_thread),"Error Closing thread handle\n");
}
}
+ rc = pSetThreadPriorityBoost(curthread,1);
+ ok( rc != 0, "error=%d\n",GetLastError());
todo_wine {
- rc = pSetThreadPriorityBoost(curthread,1);
- ok( rc != 0, "error=%d\n",GetLastError());
rc=pGetThreadPriorityBoost(curthread,&disabled);
ok(rc!=0 && disabled==1,
"rc=%d error=%d disabled=%d\n",rc,GetLastError(),disabled);
-
- rc = pSetThreadPriorityBoost(curthread,0);
- ok( rc != 0, "error=%d\n",GetLastError());
}
+
+ rc = pSetThreadPriorityBoost(curthread,0);
+ ok( rc != 0, "error=%d\n",GetLastError());
rc=pGetThreadPriorityBoost(curthread,&disabled);
ok(rc!=0 && disabled==0,
"rc=%d error=%d disabled=%d\n",rc,GetLastError(),disabled);
diff --git a/dlls/kernel32/thread.c b/dlls/kernel32/thread.c
index 5702d6c..c82ef58 100644
--- a/dlls/kernel32/thread.c
+++ b/dlls/kernel32/thread.c
@@ -357,18 +357,14 @@ BOOL WINAPI GetThreadPriorityBoost(
/**********************************************************************
* SetThreadPriorityBoost [KERNEL32.@] Sets priority boost for thread.
*
- * Priority boost is not implemented. This function always returns
- * FALSE and sets last error to ERROR_CALL_NOT_IMPLEMENTED
- *
- * RETURNS
- * Always returns FALSE to indicate a failure
+ * Priority boost is not implemented, but we return TRUE
+ * anyway because some games crash otherwise.
*/
BOOL WINAPI SetThreadPriorityBoost(
HANDLE hthread, /* [in] Handle to thread */
BOOL disable) /* [in] TRUE to disable priority boost */
{
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return FALSE;
+ return TRUE;
}
More information about the wine-cvs
mailing list