summaryrefslogtreecommitdiff
path: root/plugins/dfinput/sdljoy.c
diff options
context:
space:
mode:
authoriCatButler <i.am.catbutler@gmail.com>2018-03-13 17:25:13 +0000
committerGitHub <noreply@github.com>2018-03-13 17:25:13 +0000
commit768332417644451d38ce1a737465656c7cc75de3 (patch)
treee6ca381effb72ccc4161d40f224b817a6631bc03 /plugins/dfinput/sdljoy.c
parent15fe3782c1375634b7a9bd9bbbadfd75e7b06fed (diff)
parent2d0b10f982e0b835f4b27be26b138703907a4219 (diff)
downloadpcsxr-768332417644451d38ce1a737465656c7cc75de3.tar.gz
Merge pull request #6 from loathingKernel/fix-linux-build
Fix compilation on Linux and add the new setting to the UI
Diffstat (limited to 'plugins/dfinput/sdljoy.c')
-rwxr-xr-xplugins/dfinput/sdljoy.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/dfinput/sdljoy.c b/plugins/dfinput/sdljoy.c
index ee139517..3e8cc993 100755
--- a/plugins/dfinput/sdljoy.c
+++ b/plugins/dfinput/sdljoy.c
@@ -64,7 +64,7 @@ int JoyHapticRumble(int pad, uint32_t low, uint32_t high)
#if SDL_VERSION_ATLEAST(2,0,0)
float mag;
- if (g.PadState[pad].haptic) {
+ if (g.PadState[pad].haptic && g.cfg.PadDef[pad].PhysicalVibration) {
/* Stop the effect if it was playing. */
SDL_HapticRumbleStop(g.PadState[pad].haptic);
@@ -74,7 +74,7 @@ int JoyHapticRumble(int pad, uint32_t low, uint32_t high)
if(SDL_HapticRumblePlay(g.PadState[pad].haptic, mag, 500) != 0)
{
- printf("\nFailed to play rumble: %s\n", SDL_GetError());
+ printf("\nFailed to play rumble on pad %d with error: %s\n", pad, SDL_GetError());
return 1;
}
}