mirror of https://github.com/BOINC/boinc.git
client: fix set_client_priority()
This commit is contained in:
parent
f2cb4bd7a6
commit
3d6e1e559a
|
@ -379,7 +379,10 @@ bool CLIENT_STATE::is_new_client() {
|
|||
|
||||
#ifdef _WIN32
|
||||
typedef DWORD (WINAPI *SPC)(HANDLE, DWORD);
|
||||
#endif
|
||||
|
||||
static void set_client_priority() {
|
||||
#ifdef _WIN32
|
||||
SPC spc = (SPC) GetProcAddress(GetModuleHandle(_T("kernel32.dll")), "SetPriorityClass");
|
||||
if (!spc) return;
|
||||
if (spc(GetCurrentProcess(), PROCESS_MODE_BACKGROUND_BEGIN)) {
|
||||
|
|
Loading…
Reference in New Issue