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 committed by Simon Chan
parent 55ca08ff73
commit ecf206665e
No known key found for this signature in database
GPG key ID: A8B69F750B9BCEDD

View file

@ -215,7 +215,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: