[Change] Don't bother trying to start haptic subsystem when there's no
joystick.
This commit is contained in:
parent
25d001d05b
commit
f0fbae3f63
@ -442,6 +442,10 @@ static int spfx_hapticInit(void) {
|
|||||||
#if SDL_VERSION_ATLEAST(1,3,0)
|
#if SDL_VERSION_ATLEAST(1,3,0)
|
||||||
SDL_HapticEffect* efx;
|
SDL_HapticEffect* efx;
|
||||||
|
|
||||||
|
/* Haptic must be enabled. */
|
||||||
|
if(haptic == NULL)
|
||||||
|
return 0;
|
||||||
|
|
||||||
efx = &haptic_rumbleEffect;
|
efx = &haptic_rumbleEffect;
|
||||||
memset(efx, 0, sizeof(SDL_HapticEffect));
|
memset(efx, 0, sizeof(SDL_HapticEffect));
|
||||||
efx->type = SDL_HAPTIC_SINE;
|
efx->type = SDL_HAPTIC_SINE;
|
||||||
|
Loading…
Reference in New Issue
Block a user