mirror of
https://github.com/shadowfacts/jinput-arm64.git
synced 2026-01-11 03:09:57 +01:00
DirectInput: Don't fail entire enumeration because of one device failure
This commit is contained in:
parent
e48f275cfc
commit
b251b846f2
|
|
@ -78,7 +78,12 @@ final class IDirectInput {
|
|||
* native side will clean up in case of an exception
|
||||
*/
|
||||
private final void addDevice(long address, byte[] instance_guid, byte[] product_guid, int dev_type, int dev_subtype, String instance_name, String product_name) throws IOException {
|
||||
devices.add(new IDirectInputDevice(window, address, instance_guid, product_guid, dev_type, dev_subtype, instance_name, product_name));
|
||||
try {
|
||||
IDirectInputDevice device = new IDirectInputDevice(window, address, instance_guid, product_guid, dev_type, dev_subtype, instance_name, product_name);
|
||||
devices.add(device);
|
||||
} catch (IOException e) {
|
||||
DefaultControllerEnvironment.logln("Failed to initialize device " + product_name + " because of: " + e);
|
||||
}
|
||||
}
|
||||
|
||||
public final void releaseDevices() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue