Input: Prevent Steam from causing keybinding issues when Steam maps gamepad buttons to keyboard keys (prioritize gamepad buttons over keyboard buttons)
This commit is contained in:
parent
483fd3f128
commit
8fc489a08d
1 changed files with 7 additions and 0 deletions
|
@ -1634,6 +1634,13 @@ namespace Mesen.GUI
|
|||
public KeyCombination(List<UInt32> scanCodes = null)
|
||||
{
|
||||
if(scanCodes != null) {
|
||||
if(scanCodes.Any(code => code > 0xFFFF)) {
|
||||
//If both keyboard & gamepad codes exist, only use the gamepad codes
|
||||
//This fixes an issue with Steam where Steam can remap gamepad buttons to send keyboard keys
|
||||
//See: Settings -> Controller Settings -> General Controller Settings -> Checking the Xbox/PS4/Generic/etc controller checkboxes will cause this
|
||||
scanCodes = scanCodes.Where(code => code > 0xFFFF).ToList();
|
||||
}
|
||||
|
||||
Key1 = scanCodes.Count > 0 ? scanCodes[0] : 0;
|
||||
Key2 = scanCodes.Count > 1 ? scanCodes[1] : 0;
|
||||
Key3 = scanCodes.Count > 2 ? scanCodes[2] : 0;
|
||||
|
|
Loading…
Add table
Reference in a new issue