requesting xinput will always fail on non-windows

This commit is contained in:
Minjae Song
2019-03-04 04:55:12 +09:00
parent efa5d21717
commit 3f213cfbe0
3 changed files with 7 additions and 2 deletions

View File

@@ -335,7 +335,12 @@ public class AppLoader implements ApplicationListener {
}
// nullify if not actually connected
if (!((XinputControllerAdapter) gamepad).getC().isConnected()) {
try {
if (!((XinputControllerAdapter) gamepad).getC().isConnected()) {
gamepad = null;
}
}
catch (NullPointerException notQuiteWindows) {
gamepad = null;
}
}