- Add "DoNotRejoinJoycons" setting that allows you to use two joycons (or more) separately while in vertical mode

This commit is contained in:
David Khachaturov 2021-04-24 19:15:53 +01:00
parent b1fc5267da
commit 4423bcf881
2 changed files with 7 additions and 1 deletions

View file

@ -122,6 +122,10 @@
<!-- Double click sticks on joycons (L3, R3) to change joycon orientation --> <!-- Double click sticks on joycons (L3, R3) to change joycon orientation -->
<!-- Default: true --> <!-- Default: true -->
<add key="ChangeOrientationDoubleClick" value="true" /> <add key="ChangeOrientationDoubleClick" value="true" />
<!-- Do not rejoin joycons once split via clicking on their icon -->
<!-- When 'true' allows you to double-click the joycons to split them and then change their orientation to vertical -->
<!-- Default: false -->
<add key="DoNotRejoinJoycons" value="false" />
<!-- Determines what type of debugging information to be printed --> <!-- Determines what type of debugging information to be printed -->
<!-- None = 0 --> <!-- None = 0 -->

View file

@ -162,6 +162,8 @@ namespace BetterJoyForCemu {
} }
} }
bool doNotRejoin = Boolean.Parse(ConfigurationManager.AppSettings["DoNotRejoinJoycons"]);
public void conBtnClick(object sender, EventArgs e) { public void conBtnClick(object sender, EventArgs e) {
Button button = sender as Button; Button button = sender as Button;
@ -171,7 +173,7 @@ namespace BetterJoyForCemu {
if (v.other == null && !v.isPro) { // needs connecting to other joycon (so messy omg) if (v.other == null && !v.isPro) { // needs connecting to other joycon (so messy omg)
bool succ = false; bool succ = false;
if (Program.mgr.j.Count == 1) { // when want to have a single joycon in vertical mode if (Program.mgr.j.Count == 1 || doNotRejoin) { // when want to have a single joycon in vertical mode
v.other = v; // hacky; implement check in Joycon.cs to account for this v.other = v; // hacky; implement check in Joycon.cs to account for this
succ = true; succ = true;
} else { } else {