diff options
author | Lioncash <mathew1800@gmail.com> | 2021-12-13 16:49:06 +0100 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2021-12-13 16:49:11 +0100 |
commit | d52ad96ce348656b2ea7de8b8a85badfa86d2860 (patch) | |
tree | 1d054ac61a893b2b16e977b3b792b7b320d9407f /src/input_common/drivers/tas_input.cpp | |
parent | tas_input: Make TasAxes enum an enum class (diff) | |
download | yuzu-d52ad96ce348656b2ea7de8b8a85badfa86d2860.tar yuzu-d52ad96ce348656b2ea7de8b8a85badfa86d2860.tar.gz yuzu-d52ad96ce348656b2ea7de8b8a85badfa86d2860.tar.bz2 yuzu-d52ad96ce348656b2ea7de8b8a85badfa86d2860.tar.lz yuzu-d52ad96ce348656b2ea7de8b8a85badfa86d2860.tar.xz yuzu-d52ad96ce348656b2ea7de8b8a85badfa86d2860.tar.zst yuzu-d52ad96ce348656b2ea7de8b8a85badfa86d2860.zip |
Diffstat (limited to 'src/input_common/drivers/tas_input.cpp')
-rw-r--r-- | src/input_common/drivers/tas_input.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/input_common/drivers/tas_input.cpp b/src/input_common/drivers/tas_input.cpp index 1a38616b4..19d8ccae3 100644 --- a/src/input_common/drivers/tas_input.cpp +++ b/src/input_common/drivers/tas_input.cpp @@ -238,13 +238,13 @@ TasAnalog Tas::ReadCommandAxis(const std::string& line) const { return {x, y}; } -u64 Tas::ReadCommandButtons(const std::string& data) const { - std::stringstream button_text(data); - std::string line; +u64 Tas::ReadCommandButtons(const std::string& line) const { + std::stringstream button_text(line); + std::string button_line; u64 buttons = 0; - while (std::getline(button_text, line, ';')) { + while (std::getline(button_text, button_line, ';')) { for (auto [text, tas_button] : text_to_tas_button) { - if (text == line) { + if (text == button_line) { buttons |= static_cast<u64>(tas_button); break; } |