- Add option to double click sticks to change joycon orientation (split or join)
This commit is contained in:
parent
f1996f3864
commit
b1fc5267da
2 changed files with 20 additions and 0 deletions
|
@ -119,6 +119,10 @@
|
||||||
<!-- Default: true -->
|
<!-- Default: true -->
|
||||||
<add key="HomeLongPowerOff" value="true" />
|
<add key="HomeLongPowerOff" value="true" />
|
||||||
|
|
||||||
|
<!-- Double click sticks on joycons (L3, R3) to change joycon orientation -->
|
||||||
|
<!-- Default: true -->
|
||||||
|
<add key="ChangeOrientationDoubleClick" value="true" />
|
||||||
|
|
||||||
<!-- Determines what type of debugging information to be printed -->
|
<!-- Determines what type of debugging information to be printed -->
|
||||||
<!-- None = 0 -->
|
<!-- None = 0 -->
|
||||||
<!-- All = 1 -->
|
<!-- All = 1 -->
|
||||||
|
|
|
@ -682,6 +682,9 @@ namespace BetterJoyForCemu {
|
||||||
bool HomeLongPowerOff = Boolean.Parse(ConfigurationManager.AppSettings["HomeLongPowerOff"]);
|
bool HomeLongPowerOff = Boolean.Parse(ConfigurationManager.AppSettings["HomeLongPowerOff"]);
|
||||||
long PowerOffInactivityMins = Int32.Parse(ConfigurationManager.AppSettings["PowerOffInactivity"]);
|
long PowerOffInactivityMins = Int32.Parse(ConfigurationManager.AppSettings["PowerOffInactivity"]);
|
||||||
|
|
||||||
|
bool ChangeOrientationDoubleClick = Boolean.Parse(ConfigurationManager.AppSettings["ChangeOrientationDoubleClick"]);
|
||||||
|
long lastDoubleClick = -1;
|
||||||
|
|
||||||
string extraGyroFeature = ConfigurationManager.AppSettings["GyroToJoyOrMouse"];
|
string extraGyroFeature = ConfigurationManager.AppSettings["GyroToJoyOrMouse"];
|
||||||
int GyroMouseSensitivityX = Int32.Parse(ConfigurationManager.AppSettings["GyroMouseSensitivityX"]);
|
int GyroMouseSensitivityX = Int32.Parse(ConfigurationManager.AppSettings["GyroMouseSensitivityX"]);
|
||||||
int GyroMouseSensitivityY = Int32.Parse(ConfigurationManager.AppSettings["GyroMouseSensitivityY"]);
|
int GyroMouseSensitivityY = Int32.Parse(ConfigurationManager.AppSettings["GyroMouseSensitivityY"]);
|
||||||
|
@ -689,6 +692,7 @@ namespace BetterJoyForCemu {
|
||||||
bool GyroAnalogSliders = Boolean.Parse(ConfigurationManager.AppSettings["GyroAnalogSliders"]);
|
bool GyroAnalogSliders = Boolean.Parse(ConfigurationManager.AppSettings["GyroAnalogSliders"]);
|
||||||
int GyroAnalogSensitivity = Int32.Parse(ConfigurationManager.AppSettings["GyroAnalogSensitivity"]);
|
int GyroAnalogSensitivity = Int32.Parse(ConfigurationManager.AppSettings["GyroAnalogSensitivity"]);
|
||||||
byte[] sliderVal = new byte[] { 0, 0 };
|
byte[] sliderVal = new byte[] { 0, 0 };
|
||||||
|
|
||||||
private void DoThingsWithButtons() {
|
private void DoThingsWithButtons() {
|
||||||
int powerOffButton = (int)((isPro || !isLeft || other != null) ? Button.HOME : Button.CAPTURE);
|
int powerOffButton = (int)((isPro || !isLeft || other != null) ? Button.HOME : Button.CAPTURE);
|
||||||
|
|
||||||
|
@ -703,6 +707,18 @@ namespace BetterJoyForCemu {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ChangeOrientationDoubleClick && buttons_down[(int)Button.STICK] && lastDoubleClick != -1 && !isPro) {
|
||||||
|
if ((buttons_down_timestamp[(int)Button.STICK] - lastDoubleClick) < 3000000) {
|
||||||
|
form.conBtnClick(form.con[PadId], EventArgs.Empty); // trigger connection button click
|
||||||
|
|
||||||
|
lastDoubleClick = buttons_down_timestamp[(int)Button.STICK];
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
lastDoubleClick = buttons_down_timestamp[(int)Button.STICK];
|
||||||
|
} else if (ChangeOrientationDoubleClick && buttons_down[(int)Button.STICK] && !isPro) {
|
||||||
|
lastDoubleClick = buttons_down_timestamp[(int)Button.STICK];
|
||||||
|
}
|
||||||
|
|
||||||
if (PowerOffInactivityMins > 0) {
|
if (PowerOffInactivityMins > 0) {
|
||||||
if ((timestamp - inactivity) / 10000 > PowerOffInactivityMins * 60 * 1000) {
|
if ((timestamp - inactivity) / 10000 > PowerOffInactivityMins * 60 * 1000) {
|
||||||
if (other != null)
|
if (other != null)
|
||||||
|
|
Loading…
Add table
Reference in a new issue