mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-29 14:38:29 +00:00
add logging for the case when haptic is not detected on the joystick as well.
This commit is contained in:
@@ -78,9 +78,13 @@ main(int argc, char *argv[])
|
|||||||
haptic = NULL;
|
haptic = NULL;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
SDL_Log("Joy haptic FAILED!\n");
|
SDL_Log("Joy haptic open FAILED!\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
SDL_Log("No haptic found\n");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case SDL_JOYDEVICEREMOVED:
|
case SDL_JOYDEVICEREMOVED:
|
||||||
@@ -91,6 +95,7 @@ main(int argc, char *argv[])
|
|||||||
if(haptic)
|
if(haptic)
|
||||||
{
|
{
|
||||||
SDL_HapticClose(haptic);
|
SDL_HapticClose(haptic);
|
||||||
|
haptic = NULL;
|
||||||
}
|
}
|
||||||
SDL_JoystickClose(joystick);
|
SDL_JoystickClose(joystick);
|
||||||
joystick = NULL;
|
joystick = NULL;
|
||||||
|
Reference in New Issue
Block a user