diff --git a/build.gradle b/build.gradle
index 544eee25..33328c42 100644
--- a/build.gradle
+++ b/build.gradle
@@ -30,8 +30,12 @@ repositories {
}
dependencies {
- compile 'org.lwjgl.lwjgl:lwjgl:2.9.3'
- compile 'org.slick2d:slick2d-core:1.0.1'
+ compile('org.lwjgl.lwjgl:lwjgl:2.9.3') {
+ exclude group: 'net.java.jinput', module: 'jinput'
+ }
+ compile('org.slick2d:slick2d-core:1.0.1') {
+ exclude group: 'org.lwjgl.lwjgl', module: 'lwjgl'
+ }
compile 'org.jcraft:jorbis:0.0.17'
compile 'net.lingala.zip4j:zip4j:1.3.2'
compile 'com.googlecode.soundlibs:jlayer:1.0.1-1'
diff --git a/pom.xml b/pom.xml
index 72e1f62e..ee62a0e3 100644
--- a/pom.xml
+++ b/pom.xml
@@ -126,11 +126,23 @@
org.lwjgl.lwjgl
lwjgl
2.9.3
+
+
+ net.java.jinput
+ jinput
+
+
org.slick2d
slick2d-core
1.0.1
+
+
+ org.lwjgl.lwjgl
+ lwjgl
+
+
org.jcraft
diff --git a/src/itdelatrisu/opsu/Opsu.java b/src/itdelatrisu/opsu/Opsu.java
index fc67d143..ec76eccc 100644
--- a/src/itdelatrisu/opsu/Opsu.java
+++ b/src/itdelatrisu/opsu/Opsu.java
@@ -30,6 +30,7 @@ import java.net.UnknownHostException;
import org.newdawn.slick.Color;
import org.newdawn.slick.GameContainer;
+import org.newdawn.slick.Input;
import org.newdawn.slick.SlickException;
import org.newdawn.slick.state.StateBasedGame;
import org.newdawn.slick.state.transition.FadeInTransition;
@@ -133,8 +134,9 @@ public class Opsu extends StateBasedGame {
}
File nativeDir;
- if ((nativeDir = new File("./target/natives/")).isDirectory() ||
- (nativeDir = new File("./build/natives/")).isDirectory())
+ if (!Utils.isJarRunning() && (
+ (nativeDir = new File("./target/natives/")).isDirectory() ||
+ (nativeDir = new File("./build/natives/")).isDirectory()))
;
else {
nativeDir = NativeLoader.NATIVE_DIR;
@@ -184,6 +186,9 @@ public class Opsu extends StateBasedGame {
}.start();
}
+ // disable jinput
+ Input.disableControllers();
+
// start the game
try {
// loop until force exit