mirror of
https://github.com/shadowfacts/jinput-arm64.git
synced 2026-01-08 09:49:57 +01:00
Fixes to solve issue 21
This commit is contained in:
parent
b9346a6a83
commit
a8cbd46c50
|
|
@ -162,7 +162,10 @@ public class DirectInputEnvironmentPlugin extends ControllerEnvironment
|
|||
c = DirectInputKeyboard.createKeyboard(lpDevice, subtype,
|
||||
productName, instanceName);
|
||||
} else {
|
||||
assert category == DI8DEVTYPE_JOYSTICK;
|
||||
// commented out the assert as we have already got devices that are
|
||||
// gamepad type, but wr are still going to create them as
|
||||
// DirectInputDevices
|
||||
//assert category == DI8DEVTYPE_JOYSTICK;
|
||||
c = DirectInputDevice.createDevice(lpDevice, subtype, productName,
|
||||
instanceName,polled);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -534,7 +534,9 @@ Java_net_java_games_input_DirectInputDevice_pollNative
|
|||
// Poll the device
|
||||
if (pollme == JNI_TRUE) {
|
||||
res = lpDevice->Poll();
|
||||
if (res != DI_OK) {
|
||||
// Changed this to FAILED(res) instead of res != DI_OK as it was
|
||||
// causeing problems and the dx samples check for FAILED too.
|
||||
if ( FAILED(res) ) {
|
||||
PrintDIError("Poll", res);
|
||||
return JNI_FALSE;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue