Skip to content

Commit

Permalink
Merge pull request #520 from streetpea/add_google_assistant_button_st…
Browse files Browse the repository at this point in the history
…adia

Add assistant button mapping for Google Stadia controller
  • Loading branch information
streetpea authored Jan 2, 2025
2 parents 2024315 + 9878946 commit dbec6be
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions gui/src/qmlbackend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1669,6 +1669,20 @@ void QmlBackend::controllerMappingUpdate(Controller *controller)
controller_mapping_physical_button_mappings.insert("b11", "misc1");
controllerMappingApply();
}
QString stadia_controller = "Google Stadia Controller";
if((stadia_controller == controller_mapping_controller_type) && !controller_mapping_physical_button_mappings.contains("b16"))
{
if(controller_mapping_controller_mappings.contains("paddle1"))
{
QStringList individual_mapping_list = controller_mapping_controller_mappings.value("paddle1");
individual_mapping_list.append("b16");
controller_mapping_controller_mappings.insert("paddle1", individual_mapping_list);
}
else
controller_mapping_controller_mappings.insert("paddle1", QStringList(QString("b16")));
controller_mapping_physical_button_mappings.insert("b16", "paddle1");
controllerMappingApply();
}

controller_mapping_applied_controller_mappings = controller_mapping_controller_mappings;
emit currentControllerTypeChanged();
Expand Down

0 comments on commit dbec6be

Please sign in to comment.