mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-12-16 11:06:49 +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
|
||||
SDL_SYS_HapticMouse(void)
|
||||
{
|
||||
int device_index = 0;
|
||||
int device_index = numhaptics-1;
|
||||
SDL_hapticlist_item *item;
|
||||
|
||||
for (item = SDL_hapticlist; item; item = item->next) {
|
||||
if ((item->usagePage == kHIDPage_GenericDesktop) &&
|
||||
(item->usage == kHIDUsage_GD_Mouse))
|
||||
(item->usage == kHIDUsage_GD_Mouse)) {
|
||||
return device_index;
|
||||
|
||||
++device_index;
|
||||
}
|
||||
device_index--;
|
||||
}
|
||||
|
||||
return -1;
|
||||
|
Loading…
Reference in New Issue
Block a user