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

@@ -627,11 +627,12 @@ static NSMutableSet* hostList;
_streamConfig.playAudioOnPC = streamSettings.playAudioOnPC;
_streamConfig.allowHevc = streamSettings.useHevc;
_streamConfig.useFramePacing = streamSettings.useFramePacing;
_streamConfig.swapABXYButtons = streamSettings.swapABXYButtons;
// multiController must be set before calling getConnectedGamepadMask
_streamConfig.multiController = streamSettings.multiController;
_streamConfig.gamepadMask = [ControllerSupport getConnectedGamepadMask:_streamConfig];
// Probe for supported channel configurations
int physicalOutputChannels = (int)[AVAudioSession sharedInstance].maximumOutputNumberOfChannels;
Log(LOG_I, @"Audio device supports %d channels", physicalOutputChannels);