[Change] Don't bother trying to start haptic subsystem when there's no

joystick.
This commit is contained in:
Allanis 2014-07-23 20:10:06 +01:00
parent 25d001d05b
commit f0fbae3f63

View File

@ -442,6 +442,10 @@ static int spfx_hapticInit(void) {
#if SDL_VERSION_ATLEAST(1,3,0)
SDL_HapticEffect* efx;
/* Haptic must be enabled. */
if(haptic == NULL)
return 0;
efx = &haptic_rumbleEffect;
memset(efx, 0, sizeof(SDL_HapticEffect));
efx->type = SDL_HAPTIC_SINE;