Allow action names to be used in more than one action set at the same time.

merge-requests/21/head
Mr_Goldberg 2019-09-11 09:08:05 -04:00
parent 141dfba191
commit 663728edca
No known key found for this signature in database
GPG Key ID: 8597D87419DEF278
1 changed files with 12 additions and 2 deletions

View File

@ -145,7 +145,12 @@ public ISteamInput
if (digital != button_strings.end()) { if (digital != button_strings.end()) {
ControllerDigitalActionHandle_t digital_handle_num = current_handle_num; ControllerDigitalActionHandle_t digital_handle_num = current_handle_num;
if (digital_action_handles.find(config_key.first) == digital_action_handles.end()) {
digital_action_handles[config_key.first] = digital_handle_num; digital_action_handles[config_key.first] = digital_handle_num;
} else {
digital_handle_num = digital_action_handles[config_key.first];
}
controller_maps[action_handle_num].active_digital[digital_handle_num].insert(digital->second); controller_maps[action_handle_num].active_digital[digital_handle_num].insert(digital->second);
} else { } else {
auto analog = analog_strings.find(button_string); auto analog = analog_strings.find(button_string);
@ -164,7 +169,12 @@ public ISteamInput
source_mode = input_mode->second; source_mode = input_mode->second;
} }
if (analog_action_handles.find(config_key.first) == analog_action_handles.end()) {
analog_action_handles[config_key.first] = analog_handle_num; analog_action_handles[config_key.first] = analog_handle_num;
} else {
analog_handle_num = analog_action_handles[config_key.first];
}
controller_maps[action_handle_num].active_analog[analog_handle_num].first.insert(analog->second); controller_maps[action_handle_num].active_analog[analog_handle_num].first.insert(analog->second);
controller_maps[action_handle_num].active_analog[analog_handle_num].second = source_mode; controller_maps[action_handle_num].active_analog[analog_handle_num].second = source_mode;