mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-08-28 09:31:36 +00:00
thread: Reworked SDL_CreateThread to be consistent across platforms.
Also documented missing and weird bits, rename typedefs to fit SDL standards.
This commit is contained in:
@@ -156,7 +156,7 @@ static int SDL_HIDAPI_StartRumbleThread(SDL_HIDAPI_RumbleContext *ctx)
|
||||
}
|
||||
|
||||
SDL_AtomicSet(&ctx->running, SDL_TRUE);
|
||||
ctx->thread = SDL_CreateThreadInternal(SDL_HIDAPI_RumbleThread, "HIDAPI Rumble", 0, ctx);
|
||||
ctx->thread = SDL_CreateThread(SDL_HIDAPI_RumbleThread, "HIDAPI Rumble", ctx);
|
||||
if (!ctx->thread) {
|
||||
SDL_HIDAPI_StopRumbleThread(ctx);
|
||||
return -1;
|
||||
|
||||
@@ -286,7 +286,7 @@ static int SDL_StartJoystickThread(void)
|
||||
}
|
||||
|
||||
s_bJoystickThreadQuit = SDL_FALSE;
|
||||
s_joystickThread = SDL_CreateThreadInternal(SDL_JoystickThread, "SDL_joystick", 64 * 1024, NULL);
|
||||
s_joystickThread = SDL_CreateThreadWithStackSize(SDL_JoystickThread, "SDL_joystick", 64 * 1024, NULL);
|
||||
if (!s_joystickThread) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user