cmake: Fix building with -DSDL_HAPTIC=Off
This commit is contained in:
parent
fe97f01bc6
commit
b162629546
3 changed files with 11 additions and 2 deletions
|
@ -359,9 +359,13 @@ WINDOWS_JoystickDetect(void)
|
|||
JoyStick_DeviceData *pListNext = NULL;
|
||||
|
||||
if (pCurList->bXInputDevice) {
|
||||
#if SDL_HAPTIC_XINPUT
|
||||
SDL_XINPUT_MaybeRemoveDevice(pCurList->XInputUserId);
|
||||
#endif
|
||||
} else {
|
||||
#if SDL_HAPTIC_DINPUT
|
||||
SDL_DINPUT_MaybeRemoveDevice(&pCurList->dxdevice);
|
||||
#endif
|
||||
}
|
||||
|
||||
SDL_PrivateJoystickRemoved(pCurList->nInstanceID);
|
||||
|
@ -380,9 +384,13 @@ WINDOWS_JoystickDetect(void)
|
|||
while (pNewJoystick) {
|
||||
if (pNewJoystick->send_add_event) {
|
||||
if (pNewJoystick->bXInputDevice) {
|
||||
#if SDL_HAPTIC_XINPUT
|
||||
SDL_XINPUT_MaybeAddDevice(pNewJoystick->XInputUserId);
|
||||
#endif
|
||||
} else {
|
||||
#if SDL_HAPTIC_DINPUT
|
||||
SDL_DINPUT_MaybeAddDevice(&pNewJoystick->dxdevice);
|
||||
#endif
|
||||
}
|
||||
|
||||
SDL_PrivateJoystickAdded(pNewJoystick->nInstanceID);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue