summaryrefslogtreecommitdiff
path: root/src/input_common/input_poller.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/input_common/input_poller.cpp')
-rw-r--r--src/input_common/input_poller.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/input_common/input_poller.cpp b/src/input_common/input_poller.cpp
index fff9731ce..4ac182147 100644
--- a/src/input_common/input_poller.cpp
+++ b/src/input_common/input_poller.cpp
@@ -801,8 +801,8 @@ std::unique_ptr<Common::Input::InputDevice> InputFactory::CreateButtonDevice(
801 801
802 const auto button_id = params.Get("button", 0); 802 const auto button_id = params.Get("button", 0);
803 const auto keyboard_key = params.Get("code", 0); 803 const auto keyboard_key = params.Get("code", 0);
804 const auto toggle = params.Get("toggle", false); 804 const auto toggle = params.Get("toggle", false) != 0;
805 const auto inverted = params.Get("inverted", false); 805 const auto inverted = params.Get("inverted", false) != 0;
806 input_engine->PreSetController(identifier); 806 input_engine->PreSetController(identifier);
807 input_engine->PreSetButton(identifier, button_id); 807 input_engine->PreSetButton(identifier, button_id);
808 input_engine->PreSetButton(identifier, keyboard_key); 808 input_engine->PreSetButton(identifier, keyboard_key);
@@ -824,8 +824,8 @@ std::unique_ptr<Common::Input::InputDevice> InputFactory::CreateHatButtonDevice(
824 824
825 const auto button_id = params.Get("hat", 0); 825 const auto button_id = params.Get("hat", 0);
826 const auto direction = input_engine->GetHatButtonId(params.Get("direction", "")); 826 const auto direction = input_engine->GetHatButtonId(params.Get("direction", ""));
827 const auto toggle = params.Get("toggle", false); 827 const auto toggle = params.Get("toggle", false) != 0;
828 const auto inverted = params.Get("inverted", false); 828 const auto inverted = params.Get("inverted", false) != 0;
829 829
830 input_engine->PreSetController(identifier); 830 input_engine->PreSetController(identifier);
831 input_engine->PreSetHatButton(identifier, button_id); 831 input_engine->PreSetHatButton(identifier, button_id);
@@ -883,7 +883,7 @@ std::unique_ptr<Common::Input::InputDevice> InputFactory::CreateAnalogDevice(
883 .threshold = std::clamp(params.Get("threshold", 0.5f), 0.0f, 1.0f), 883 .threshold = std::clamp(params.Get("threshold", 0.5f), 0.0f, 1.0f),
884 .offset = std::clamp(params.Get("offset", 0.0f), -1.0f, 1.0f), 884 .offset = std::clamp(params.Get("offset", 0.0f), -1.0f, 1.0f),
885 .inverted = params.Get("invert", "+") == "-", 885 .inverted = params.Get("invert", "+") == "-",
886 .toggle = static_cast<bool>(params.Get("toggle", false)), 886 .toggle = params.Get("toggle", false) != 0,
887 }; 887 };
888 input_engine->PreSetController(identifier); 888 input_engine->PreSetController(identifier);
889 input_engine->PreSetAxis(identifier, axis); 889 input_engine->PreSetAxis(identifier, axis);
@@ -899,8 +899,8 @@ std::unique_ptr<Common::Input::InputDevice> InputFactory::CreateTriggerDevice(
899 }; 899 };
900 900
901 const auto button = params.Get("button", 0); 901 const auto button = params.Get("button", 0);
902 const auto toggle = params.Get("toggle", false); 902 const auto toggle = params.Get("toggle", false) != 0;
903 const auto inverted = params.Get("inverted", false); 903 const auto inverted = params.Get("inverted", false) != 0;
904 904
905 const auto axis = params.Get("axis", 0); 905 const auto axis = params.Get("axis", 0);
906 const Common::Input::AnalogProperties properties = { 906 const Common::Input::AnalogProperties properties = {
@@ -930,8 +930,8 @@ std::unique_ptr<Common::Input::InputDevice> InputFactory::CreateTouchDevice(
930 }; 930 };
931 931
932 const auto button = params.Get("button", 0); 932 const auto button = params.Get("button", 0);
933 const auto toggle = params.Get("toggle", false); 933 const auto toggle = params.Get("toggle", false) != 0;
934 const auto inverted = params.Get("inverted", false); 934 const auto inverted = params.Get("inverted", false) != 0;
935 935
936 const auto axis_x = params.Get("axis_x", 0); 936 const auto axis_x = params.Get("axis_x", 0);
937 const Common::Input::AnalogProperties properties_x = { 937 const Common::Input::AnalogProperties properties_x = {