mirror of
https://github.com/shadowfacts/lwjgl2-arm64.git
synced 2026-03-21 20:54:43 +01:00
Mac OS X: Catch exceptions from getLockingKeyState
This commit is contained in:
parent
15676f6129
commit
6e6bdb1fa0
|
|
@ -428,8 +428,13 @@ final class MacOSXDisplay implements DisplayImplementation {
|
|||
default:
|
||||
return Keyboard.STATE_UNKNOWN;
|
||||
}
|
||||
boolean state = Toolkit.getDefaultToolkit().getLockingKeyState(awt_key);
|
||||
return state ? Keyboard.STATE_ON : Keyboard.STATE_OFF;
|
||||
try {
|
||||
boolean state = Toolkit.getDefaultToolkit().getLockingKeyState(awt_key);
|
||||
return state ? Keyboard.STATE_ON : Keyboard.STATE_OFF;
|
||||
} catch (Exception e) {
|
||||
LWJGLUtil.log("Failed to query key state: " + e);
|
||||
return Keyboard.STATE_UNKNOWN;
|
||||
}
|
||||
}
|
||||
|
||||
/** Native cursor handles */
|
||||
|
|
|
|||
Loading…
Reference in a new issue