Rename haptic methods to avoid confusion with joystick:
`SDL_DINPUT_MaybeAddDevice`->`SDL_DINPUT_HapticMaybeAddDevice` `SDL_DINPUT_MaybeRemoveDevice`->`SDL_DINPUT_HapticMaybeRemoveDevice` `SDL_XINPUT_MaybeAddDevice`->`SDL_XINPUT_HapticMaybeAddDevice` `SDL_XINPUT_MaybeRemoveDevice`->`SDL_XINPUT_HapticMaybeRemoveDevice`main
parent
73dc68a7ae
commit
a6da2fbf73
|
@ -61,7 +61,7 @@ static BOOL CALLBACK
|
|||
EnumHapticsCallback(const DIDEVICEINSTANCE * pdidInstance, VOID * pContext)
|
||||
{
|
||||
(void) pContext;
|
||||
SDL_DINPUT_MaybeAddDevice(pdidInstance);
|
||||
SDL_DINPUT_HapticMaybeAddDevice(pdidInstance);
|
||||
return DIENUM_CONTINUE; /* continue enumerating */
|
||||
}
|
||||
|
||||
|
@ -117,7 +117,7 @@ SDL_DINPUT_HapticInit(void)
|
|||
}
|
||||
|
||||
int
|
||||
SDL_DINPUT_MaybeAddDevice(const DIDEVICEINSTANCE * pdidInstance)
|
||||
SDL_DINPUT_HapticMaybeAddDevice(const DIDEVICEINSTANCE * pdidInstance)
|
||||
{
|
||||
HRESULT ret;
|
||||
LPDIRECTINPUTDEVICE8 device;
|
||||
|
@ -176,7 +176,7 @@ SDL_DINPUT_MaybeAddDevice(const DIDEVICEINSTANCE * pdidInstance)
|
|||
}
|
||||
|
||||
int
|
||||
SDL_DINPUT_MaybeRemoveDevice(const DIDEVICEINSTANCE * pdidInstance)
|
||||
SDL_DINPUT_HapticMaybeRemoveDevice(const DIDEVICEINSTANCE * pdidInstance)
|
||||
{
|
||||
SDL_hapticlist_item *item;
|
||||
SDL_hapticlist_item *prev = NULL;
|
||||
|
@ -1188,13 +1188,13 @@ SDL_DINPUT_HapticInit(void)
|
|||
}
|
||||
|
||||
int
|
||||
SDL_DINPUT_MaybeAddDevice(const DIDEVICEINSTANCE * pdidInstance)
|
||||
SDL_DINPUT_HapticMaybeAddDevice(const DIDEVICEINSTANCE * pdidInstance)
|
||||
{
|
||||
return SDL_Unsupported();
|
||||
}
|
||||
|
||||
int
|
||||
SDL_DINPUT_MaybeRemoveDevice(const DIDEVICEINSTANCE * pdidInstance)
|
||||
SDL_DINPUT_HapticMaybeRemoveDevice(const DIDEVICEINSTANCE * pdidInstance)
|
||||
{
|
||||
return SDL_Unsupported();
|
||||
}
|
||||
|
|
|
@ -25,8 +25,8 @@
|
|||
|
||||
|
||||
extern int SDL_DINPUT_HapticInit(void);
|
||||
extern int SDL_DINPUT_MaybeAddDevice(const DIDEVICEINSTANCE *pdidInstance);
|
||||
extern int SDL_DINPUT_MaybeRemoveDevice(const DIDEVICEINSTANCE *pdidInstance);
|
||||
extern int SDL_DINPUT_HapticMaybeAddDevice(const DIDEVICEINSTANCE *pdidInstance);
|
||||
extern int SDL_DINPUT_HapticMaybeRemoveDevice(const DIDEVICEINSTANCE *pdidInstance);
|
||||
extern int SDL_DINPUT_HapticOpen(SDL_Haptic * haptic, SDL_hapticlist_item *item);
|
||||
extern int SDL_DINPUT_JoystickSameHaptic(SDL_Haptic * haptic, SDL_Joystick * joystick);
|
||||
extern int SDL_DINPUT_HapticOpenFromJoystick(SDL_Haptic * haptic, SDL_Joystick * joystick);
|
||||
|
|
|
@ -50,14 +50,14 @@ SDL_XINPUT_HapticInit(void)
|
|||
if (loaded_xinput) {
|
||||
DWORD i;
|
||||
for (i = 0; i < XUSER_MAX_COUNT; i++) {
|
||||
SDL_XINPUT_MaybeAddDevice(i);
|
||||
SDL_XINPUT_HapticMaybeAddDevice(i);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
SDL_XINPUT_MaybeAddDevice(const DWORD dwUserid)
|
||||
SDL_XINPUT_HapticMaybeAddDevice(const DWORD dwUserid)
|
||||
{
|
||||
const Uint8 userid = (Uint8)dwUserid;
|
||||
SDL_hapticlist_item *item;
|
||||
|
@ -106,7 +106,7 @@ SDL_XINPUT_MaybeAddDevice(const DWORD dwUserid)
|
|||
}
|
||||
|
||||
int
|
||||
SDL_XINPUT_MaybeRemoveDevice(const DWORD dwUserid)
|
||||
SDL_XINPUT_HapticMaybeRemoveDevice(const DWORD dwUserid)
|
||||
{
|
||||
const Uint8 userid = (Uint8)dwUserid;
|
||||
SDL_hapticlist_item *item;
|
||||
|
@ -377,13 +377,13 @@ SDL_XINPUT_HapticInit(void)
|
|||
}
|
||||
|
||||
int
|
||||
SDL_XINPUT_MaybeAddDevice(const DWORD dwUserid)
|
||||
SDL_XINPUT_HapticMaybeAddDevice(const DWORD dwUserid)
|
||||
{
|
||||
return SDL_Unsupported();
|
||||
}
|
||||
|
||||
int
|
||||
SDL_XINPUT_MaybeRemoveDevice(const DWORD dwUserid)
|
||||
SDL_XINPUT_HapticMaybeRemoveDevice(const DWORD dwUserid)
|
||||
{
|
||||
return SDL_Unsupported();
|
||||
}
|
||||
|
|
|
@ -25,8 +25,8 @@
|
|||
|
||||
|
||||
extern int SDL_XINPUT_HapticInit(void);
|
||||
extern int SDL_XINPUT_MaybeAddDevice(const DWORD dwUserid);
|
||||
extern int SDL_XINPUT_MaybeRemoveDevice(const DWORD dwUserid);
|
||||
extern int SDL_XINPUT_HapticMaybeAddDevice(const DWORD dwUserid);
|
||||
extern int SDL_XINPUT_HapticMaybeRemoveDevice(const DWORD dwUserid);
|
||||
extern int SDL_XINPUT_HapticOpen(SDL_Haptic * haptic, SDL_hapticlist_item *item);
|
||||
extern int SDL_XINPUT_JoystickSameHaptic(SDL_Haptic * haptic, SDL_Joystick * joystick);
|
||||
extern int SDL_XINPUT_HapticOpenFromJoystick(SDL_Haptic * haptic, SDL_Joystick * joystick);
|
||||
|
|
|
@ -429,11 +429,11 @@ WINDOWS_JoystickDetect(void)
|
|||
|
||||
if (pCurList->bXInputDevice) {
|
||||
#if SDL_HAPTIC_XINPUT
|
||||
SDL_XINPUT_MaybeRemoveDevice(pCurList->XInputUserId);
|
||||
SDL_XINPUT_HapticMaybeRemoveDevice(pCurList->XInputUserId);
|
||||
#endif
|
||||
} else {
|
||||
#if SDL_HAPTIC_DINPUT
|
||||
SDL_DINPUT_MaybeRemoveDevice(&pCurList->dxdevice);
|
||||
SDL_DINPUT_HapticMaybeRemoveDevice(&pCurList->dxdevice);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -449,11 +449,11 @@ WINDOWS_JoystickDetect(void)
|
|||
if (pCurList->send_add_event) {
|
||||
if (pCurList->bXInputDevice) {
|
||||
#if SDL_HAPTIC_XINPUT
|
||||
SDL_XINPUT_MaybeAddDevice(pCurList->XInputUserId);
|
||||
SDL_XINPUT_HapticMaybeAddDevice(pCurList->XInputUserId);
|
||||
#endif
|
||||
} else {
|
||||
#if SDL_HAPTIC_DINPUT
|
||||
SDL_DINPUT_MaybeAddDevice(&pCurList->dxdevice);
|
||||
SDL_DINPUT_HapticMaybeAddDevice(&pCurList->dxdevice);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue