mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-16 14:56:00 +00:00
Enable SDL_HINT_JOYSTICK_THREAD by default
If you're not using SDL for video you won't get raw input messages without this hint, and this is tripping up enough people it makes sense to have this enabled by default. There isn't much downside to this, other than having another thread processing Xbox controller input. Fixes https://github.com/libsdl-org/SDL/issues/10576
This commit is contained in:
@@ -284,7 +284,7 @@ static bool SDL_StartJoystickThread(void)
|
||||
}
|
||||
|
||||
s_bJoystickThreadQuit = false;
|
||||
s_joystickThread = SDL_CreateThreadWithStackSize(SDL_JoystickThread, "SDL_joystick", 64 * 1024, NULL);
|
||||
s_joystickThread = SDL_CreateThread(SDL_JoystickThread, "SDL_joystick", NULL);
|
||||
if (!s_joystickThread) {
|
||||
return false;
|
||||
}
|
||||
@@ -344,7 +344,7 @@ static bool WINDOWS_JoystickInit(void)
|
||||
WIN_InitDeviceNotification();
|
||||
|
||||
#if !defined(SDL_PLATFORM_XBOXONE) && !defined(SDL_PLATFORM_XBOXSERIES)
|
||||
s_bJoystickThread = SDL_GetHintBoolean(SDL_HINT_JOYSTICK_THREAD, false);
|
||||
s_bJoystickThread = SDL_GetHintBoolean(SDL_HINT_JOYSTICK_THREAD, true);
|
||||
if (s_bJoystickThread) {
|
||||
if (!SDL_StartJoystickThread()) {
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user