mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2025-01-07 18:39:37 +01:00
Make SDL_SYS_HapticMouse() count device indexes like HapticByDevIndex().
This commit is contained in:
parent
7f94268805
commit
ccbf6943e7
@ -571,15 +571,15 @@ SDL_SYS_HapticOpen(SDL_Haptic * haptic)
|
|||||||
int
|
int
|
||||||
SDL_SYS_HapticMouse(void)
|
SDL_SYS_HapticMouse(void)
|
||||||
{
|
{
|
||||||
int device_index = 0;
|
int device_index = numhaptics-1;
|
||||||
SDL_hapticlist_item *item;
|
SDL_hapticlist_item *item;
|
||||||
|
|
||||||
for (item = SDL_hapticlist; item; item = item->next) {
|
for (item = SDL_hapticlist; item; item = item->next) {
|
||||||
if ((item->usagePage == kHIDPage_GenericDesktop) &&
|
if ((item->usagePage == kHIDPage_GenericDesktop) &&
|
||||||
(item->usage == kHIDUsage_GD_Mouse))
|
(item->usage == kHIDUsage_GD_Mouse)) {
|
||||||
return device_index;
|
return device_index;
|
||||||
|
}
|
||||||
++device_index;
|
device_index--;
|
||||||
}
|
}
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
|
Loading…
Reference in New Issue
Block a user