1
0
Fork 1
forked from suyu/suyu

Merge pull request #5757 from Morph1984/npad-handheld

npad: Add check for HANDHELD_INDEX in UpdateControllerAt()
This commit is contained in:
LC 2021-01-17 23:51:30 -05:00 committed by GitHub
commit dd0679d710
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -892,7 +892,7 @@ void Controller_NPad::UpdateControllerAt(NPadControllerType controller, std::siz
return; return;
} }
if (controller == NPadControllerType::Handheld) { if (controller == NPadControllerType::Handheld && npad_index == HANDHELD_INDEX) {
Settings::values.players.GetValue()[HANDHELD_INDEX].controller_type = Settings::values.players.GetValue()[HANDHELD_INDEX].controller_type =
MapNPadToSettingsType(controller); MapNPadToSettingsType(controller);
Settings::values.players.GetValue()[HANDHELD_INDEX].connected = true; Settings::values.players.GetValue()[HANDHELD_INDEX].connected = true;