Add setting to swap A<->B and X<->Y buttons (#513)

* Added toggle for swapping A<->B and X<->Y buttons to enable proper button mapping for combined Joy-Cons in iOS16, where iOS level remapping is not supported and pushing Switch B (bottom face button) sends Xbox B (right face button) instead of Xbox A (bottom face button), etc.  Allows user to select between current behavior (button letter matches output) and muscle-memory behavior (face button pressed matches location of face button output)
This commit is contained in:
IonBlade2K
2022-07-21 20:09:22 -05:00
committed by GitHub
parent eb801b553f
commit b9e0b28adc
13 changed files with 119 additions and 52 deletions

View File

@@ -242,6 +242,7 @@ BOOL isCustomResolution(CGSize res) {
[self.optimizeSettingsSelector setSelectedSegmentIndex:currentSettings.optimizeGames ? 1 : 0];
[self.framePacingSelector setSelectedSegmentIndex:currentSettings.useFramePacing ? 1 : 0];
[self.multiControllerSelector setSelectedSegmentIndex:currentSettings.multiController ? 1 : 0];
[self.swapABXYButtonsSelector setSelectedSegmentIndex:currentSettings.swapABXYButtons ? 1 : 0];
[self.audioOnPCSelector setSelectedSegmentIndex:currentSettings.playAudioOnPC ? 1 : 0];
NSInteger onscreenControls = [currentSettings.onscreenControls integerValue];
_lastSelectedResolutionIndex = resolution;
@@ -463,6 +464,7 @@ BOOL isCustomResolution(CGSize res) {
NSInteger onscreenControls = [self.onscreenControlSelector selectedSegmentIndex];
BOOL optimizeGames = [self.optimizeSettingsSelector selectedSegmentIndex] == 1;
BOOL multiController = [self.multiControllerSelector selectedSegmentIndex] == 1;
BOOL swapABXYButtons = [self.swapABXYButtonsSelector selectedSegmentIndex] == 1;
BOOL audioOnPC = [self.audioOnPCSelector selectedSegmentIndex] == 1;
BOOL useHevc = [self.hevcSelector selectedSegmentIndex] == 1;
BOOL btMouseSupport = [self.btMouseSelector selectedSegmentIndex] == 1;
@@ -478,6 +480,7 @@ BOOL isCustomResolution(CGSize res) {
onscreenControls:onscreenControls
optimizeGames:optimizeGames
multiController:multiController
swapABXYButtons:swapABXYButtons
audioOnPC:audioOnPC
useHevc:useHevc
useFramePacing:useFramePacing