Skip to content
Permalink
Browse files

cmake: Fix building with -DSDL_HAPTIC=Off

  • Loading branch information
DomGries committed Jul 8, 2020
1 parent fe97f01 commit b162629546951c98fffe92c44748c74806a4caf6

File 3 of 3 in b162629

@@ -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);

0 comments on commit b162629

Please sign in to comment.