Start rumbling once a raw input controller has been correlated
Fixes https://github.com/libsdl-org/SDL/issues/5351
This commit is contained in:
parent
3167ba342d
commit
1868c5b521
2 changed files with 27 additions and 18 deletions
|
@ -1295,6 +1295,13 @@ RAWINPUT_JoystickRumble(SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uin
|
|||
}
|
||||
#endif /* SDL_JOYSTICK_RAWINPUT_XINPUT */
|
||||
|
||||
if (!rumbled) {
|
||||
#if defined(SDL_JOYSTICK_RAWINPUT_WGI) || defined(SDL_JOYSTICK_RAWINPUT_XINPUT)
|
||||
return SDL_SetError("Controller isn't correlated yet, try hitting a button first");
|
||||
#else
|
||||
return SDL_Unsupported();
|
||||
#endif
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue