settings: Fix mouse and keyboard mappings

This commit is contained in:
german77
2021-10-24 11:22:20 -05:00
committed by Narr the Reg
parent cc651c7c99
commit 464c4d26ac
10 changed files with 100 additions and 103 deletions

View File

@ -97,7 +97,7 @@ void ConfigureVibration::SetVibrationDevices(std::size_t player_index) {
const auto engine = param.Get("engine", "");
const auto guid = param.Get("guid", "");
const auto port = param.Get("port", "");
const auto port = param.Get("port", 0);
if (engine.empty() || engine == "keyboard" || engine == "mouse" || engine == "tas") {
continue;
@ -105,7 +105,7 @@ void ConfigureVibration::SetVibrationDevices(std::size_t player_index) {
vibration_param_str += fmt::format("engine:{}", engine);
if (!port.empty()) {
if (port != 0) {
vibration_param_str += fmt::format(",port:{}", port);
}
if (!guid.empty()) {