Fix key handler crash, allow underscore in Logistical Sorter interface, fix mod ID lookup crash

This commit is contained in:
aidancbrady committed 2017-03-22 19:37:00 -04:00
1 parent ab5b5deb23
commit 82a4c282b4
4 files changed
+22 -7

No files matched your search

@@ -40,8 +40,12 @@ public abstract class MekKeyHandler
public static boolean getIsKeyPressed(KeyBinding keyBinding)
{
int keyCode = keyBinding.getKeyCode();
return keyCode < 0 ? Mouse.isButtonDown(keyCode + 100) : Keyboard.isKeyDown(keyCode);
try {
int keyCode = keyBinding.getKeyCode();
return keyCode < 0 ? Mouse.isButtonDown(keyCode + 100) : Keyboard.isKeyDown(keyCode);
} catch(Exception e) {
return false;
}
}
public KeyBinding[] getKeyBindings ()