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`
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155
diff --git a/src/haptic/windows/SDL_dinputhaptic.c b/src/haptic/windows/SDL_dinputhaptic.c
index 7f30802..523793e 100644
--- a/src/haptic/windows/SDL_dinputhaptic.c
+++ b/src/haptic/windows/SDL_dinputhaptic.c
@@ -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();
}
diff --git a/src/haptic/windows/SDL_dinputhaptic_c.h b/src/haptic/windows/SDL_dinputhaptic_c.h
index 3766ff7..2056ad8 100644
--- a/src/haptic/windows/SDL_dinputhaptic_c.h
+++ b/src/haptic/windows/SDL_dinputhaptic_c.h
@@ -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);
diff --git a/src/haptic/windows/SDL_xinputhaptic.c b/src/haptic/windows/SDL_xinputhaptic.c
index 79b4b4c..9ee2d82 100644
--- a/src/haptic/windows/SDL_xinputhaptic.c
+++ b/src/haptic/windows/SDL_xinputhaptic.c
@@ -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();
}
diff --git a/src/haptic/windows/SDL_xinputhaptic_c.h b/src/haptic/windows/SDL_xinputhaptic_c.h
index 98e9e43..83686ef 100644
--- a/src/haptic/windows/SDL_xinputhaptic_c.h
+++ b/src/haptic/windows/SDL_xinputhaptic_c.h
@@ -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);
diff --git a/src/joystick/windows/SDL_windowsjoystick.c b/src/joystick/windows/SDL_windowsjoystick.c
index c2eebee..7a2310a 100644
--- a/src/joystick/windows/SDL_windowsjoystick.c
+++ b/src/joystick/windows/SDL_windowsjoystick.c
@@ -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
}