Skip to content

Commit be050d0

Browse files
committed
better rumble
1 parent 94d09a7 commit be050d0

1 file changed

Lines changed: 2 additions & 8 deletions

File tree

jme3-ios/src/main/java/com/jme3/system/ios/JmeIosSystem.java

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
import com.jme3.audio.ios.IosALC;
3737
import com.jme3.audio.ios.IosEFX;
3838
import com.jme3.audio.openal.ALAudioRenderer;
39-
import com.jme3.math.FastMath;
4039
import com.jme3.system.AppSettings;
4140
import com.jme3.system.JmeContext;
4241
import com.jme3.system.JmeSystemDelegate;
@@ -151,13 +150,8 @@ public void rumble(float amountHigh, float amountLow, float duration) {
151150
stopRumble();
152151
return;
153152
}
154-
float amount = Math.max(FastMath.clamp(amountHigh, 0f, 1f), FastMath.clamp(amountLow, 0f, 1f));
155-
if (amount <= 0f) {
156-
stopRumble();
157-
return;
158-
}
159153
try {
160-
LibJGLIOSDeviceBridge.setRumble(amount);
154+
LibJGLIOSDeviceBridge.rumble(amountHigh, amountLow, duration);
161155
} catch (UnsatisfiedLinkError | NoClassDefFoundError ignored) {
162156
// Desktop/unit-test runs may load this delegate without the iOS launcher.
163157
}
@@ -166,7 +160,7 @@ public void rumble(float amountHigh, float amountLow, float duration) {
166160
@Override
167161
public void stopRumble() {
168162
try {
169-
LibJGLIOSDeviceBridge.setRumble(0f);
163+
LibJGLIOSDeviceBridge.stopRumble();
170164
} catch (UnsatisfiedLinkError | NoClassDefFoundError ignored) {
171165
// Desktop/unit-test runs may load this delegate without the iOS launcher.
172166
}

0 commit comments

Comments
 (0)