The API sets the priority for the current thread, not an arbitrary thread.
Implemented thread priority as the 'nice' value on Linux. High priority threads require root permissions (you shouldn't give your game root permissions though!)
This commit is contained in:
parent
fb417a9de4
commit
f0b1c9b859
9 changed files with 51 additions and 28 deletions
|
@ -295,13 +295,9 @@ SDL_GetThreadID(SDL_Thread * thread)
|
|||
}
|
||||
|
||||
int
|
||||
SDL_SetThreadPriority(SDL_Thread * thread, SDL_ThreadPriority priority)
|
||||
SDL_SetThreadPriority(SDL_ThreadPriority priority)
|
||||
{
|
||||
if (!thread) {
|
||||
SDL_SetError("SDL_SetThreadPriority() passed NULL thread");
|
||||
return -1;
|
||||
}
|
||||
return SDL_SYS_SetThreadPriority(thread, priority);
|
||||
return SDL_SYS_SetThreadPriority(priority);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue