- Fixed joycons not being properly detached with the new lack of input lag
This commit is contained in:
parent
7b722dddb3
commit
5857a44f65
3 changed files with 6 additions and 6 deletions
|
@ -46,7 +46,6 @@
|
||||||
<!-- Default: false -->
|
<!-- Default: false -->
|
||||||
<add key="UseHIDG" value="true" />
|
<add key="UseHIDG" value="true" />
|
||||||
|
|
||||||
|
|
||||||
<!-- Determines whether or not to enable (experimental - currently default controller to pro) support for 3rd-party controllers. Adds a "Calibrate" button. -->
|
<!-- Determines whether or not to enable (experimental - currently default controller to pro) support for 3rd-party controllers. Adds a "Calibrate" button. -->
|
||||||
<!-- When "true", click "Calibrate" button once to get gyro calibrate data. -->
|
<!-- When "true", click "Calibrate" button once to get gyro calibrate data. -->
|
||||||
<!-- When enabled, can only calibrate one controller at a time. -->
|
<!-- When enabled, can only calibrate one controller at a time. -->
|
||||||
|
|
|
@ -469,7 +469,7 @@ namespace BetterJoyForCemu {
|
||||||
filterweight = a;
|
filterweight = a;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Detach() {
|
public void Detach(bool close = false) {
|
||||||
stop_polling = true;
|
stop_polling = true;
|
||||||
|
|
||||||
if (xin != null) {
|
if (xin != null) {
|
||||||
|
@ -494,7 +494,7 @@ namespace BetterJoyForCemu {
|
||||||
HIDapi.hid_write(handle, a, new UIntPtr(2));
|
HIDapi.hid_write(handle, a, new UIntPtr(2));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (state > state_.DROPPED) {
|
if (close || state > state_.DROPPED) {
|
||||||
HIDapi.hid_close(handle);
|
HIDapi.hid_close(handle);
|
||||||
}
|
}
|
||||||
state = state_.NOT_ATTACHED;
|
state = state_.NOT_ATTACHED;
|
||||||
|
@ -646,6 +646,7 @@ namespace BetterJoyForCemu {
|
||||||
if ((timestamp - buttons_down_timestamp[powerOffButton]) / 10000 > 2000.0) {
|
if ((timestamp - buttons_down_timestamp[powerOffButton]) / 10000 > 2000.0) {
|
||||||
if (other != null)
|
if (other != null)
|
||||||
other.PowerOff();
|
other.PowerOff();
|
||||||
|
|
||||||
PowerOff();
|
PowerOff();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -728,7 +729,7 @@ namespace BetterJoyForCemu {
|
||||||
|
|
||||||
int a = ReceiveRaw();
|
int a = ReceiveRaw();
|
||||||
|
|
||||||
if (a > 0) {
|
if (a > 0 && state > state_.DROPPED) {
|
||||||
state = state_.IMU_DATA_OK;
|
state = state_.IMU_DATA_OK;
|
||||||
attempts = 0;
|
attempts = 0;
|
||||||
|
|
||||||
|
|
|
@ -70,7 +70,7 @@ namespace BetterJoyForCemu {
|
||||||
if (v.other != null)
|
if (v.other != null)
|
||||||
v.other.other = null; // The other of the other is the joycon itself
|
v.other.other = null; // The other of the other is the joycon itself
|
||||||
|
|
||||||
v.Detach(); rem.Add(v);
|
v.Detach(true); rem.Add(v);
|
||||||
|
|
||||||
foreach (Button b in form.con) {
|
foreach (Button b in form.con) {
|
||||||
if (b.Enabled & b.Tag == v) {
|
if (b.Enabled & b.Tag == v) {
|
||||||
|
@ -83,7 +83,7 @@ namespace BetterJoyForCemu {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
form.AppendTextBox("Removed dropped controller to list. Can be reconnected.\r\n");
|
form.AppendTextBox("Removed dropped controller. Can be reconnected.\r\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue