mirror of
https://github.com/shadowfacts/jinput-arm64.git
synced 2026-04-21 06:14:11 +00:00
Trying to sort out some of the crashes and failed exits
This commit is contained in:
parent
552fdad56d
commit
4c91a4eb44
3 changed files with 10 additions and 13 deletions
|
|
@ -335,7 +335,10 @@ JNIEXPORT jboolean JNICALL Java_net_java_games_input_JInputLibrary_getFFEnabled
|
|||
*/
|
||||
JNIEXPORT void JNICALL Java_net_java_games_input_JInputLibrary_nativeRumble
|
||||
(JNIEnv *, jclass, jint deviceID, jfloat force) {
|
||||
jinputDeviceList[deviceID]->rumble(force);
|
||||
if(jinputDeviceList[deviceID]!=0) {
|
||||
LOG_TRACE("Setting rumble on device %d to %d\n", deviceID, force);
|
||||
jinputDeviceList[deviceID]->rumble(force);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -346,8 +349,9 @@ JNIEXPORT void JNICALL Java_net_java_games_input_JInputLibrary_nativeRumble
|
|||
JNIEXPORT void JNICALL Java_net_java_games_input_JInputLibrary_nativeCleanup
|
||||
(JNIEnv *, jclass, jint deviceID) {
|
||||
if(jinputDeviceList[deviceID]!=0) {
|
||||
LOG_TRACE("Cleaning up device %d\n", deviceID);
|
||||
jinputDeviceList[deviceID]->cleanup();
|
||||
free(jinputDeviceList);
|
||||
free(jinputDeviceList[deviceID]);
|
||||
jinputDeviceList[deviceID]=0;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue