mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2025-10-30 08:01:01 +00:00
the real fix for sdl joystick lag
This commit is contained in:
parent
6d1f533113
commit
2362f67f4a
1 changed files with 2 additions and 2 deletions
|
@ -215,7 +215,7 @@ static void controller_sdl_read(OSContPad *pad) {
|
|||
sdl_haptic = NULL;
|
||||
}
|
||||
|
||||
if (sdl_cntrl == NULL || last_gamepad != configGamepadNumber) {
|
||||
if ((!sdl_cntrl && !sdl_joystick) || last_gamepad != configGamepadNumber) {
|
||||
if (sdl_haptic) { SDL_HapticClose(sdl_haptic); sdl_haptic = NULL; }
|
||||
if (sdl_cntrl) { SDL_GameControllerClose(sdl_cntrl); sdl_cntrl = NULL; }
|
||||
if (sdl_joystick) { SDL_JoystickClose(sdl_joystick); sdl_joystick = NULL; }
|
||||
|
@ -225,7 +225,7 @@ static void controller_sdl_read(OSContPad *pad) {
|
|||
if (sdl_cntrl != NULL) {
|
||||
sdl_haptic = controller_sdl_init_haptics(configGamepadNumber);
|
||||
}
|
||||
} else if (!sdl_joystick) {
|
||||
} else {
|
||||
sdl_joystick = SDL_JoystickOpen(configGamepadNumber);
|
||||
if (!sdl_joystick) { return; }
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue