Fix no input working if uinput is not supported

This commit is contained in:
Luiz Henrique Laurini 2021-04-30 20:30:23 -03:00
parent f202e69a31
commit a4aeb0a950

View file

@ -185,7 +185,12 @@ public class Controller {
switch (event) {
case GameController.DEVICE_ADDED:
gameControllers.append(id, new GameController());
try {
gameControllers.append(id, new GameController());
} catch (Exception e) {
Ln.e("It seems your phone doesn't support this feature without root. Game controllers will be disabled.", e);
gameControllersEnabled = false;
}
break;
case GameController.DEVICE_REMOVED: