summaryrefslogtreecommitdiff
path: root/src/input_common/sdl
diff options
context:
space:
mode:
Diffstat (limited to 'src/input_common/sdl')
-rw-r--r--src/input_common/sdl/sdl.h2
-rw-r--r--src/input_common/sdl/sdl_impl.cpp7
2 files changed, 6 insertions, 3 deletions
diff --git a/src/input_common/sdl/sdl.h b/src/input_common/sdl/sdl.h
index f3554be9a..42bbf14d4 100644
--- a/src/input_common/sdl/sdl.h
+++ b/src/input_common/sdl/sdl.h
@@ -23,7 +23,7 @@ public:
23 /// Unregisters SDL device factories and shut them down. 23 /// Unregisters SDL device factories and shut them down.
24 virtual ~State() = default; 24 virtual ~State() = default;
25 25
26 virtual Pollers GetPollers(Polling::DeviceType type) { 26 virtual Pollers GetPollers(Polling::DeviceType) {
27 return {}; 27 return {};
28 } 28 }
29 29
diff --git a/src/input_common/sdl/sdl_impl.cpp b/src/input_common/sdl/sdl_impl.cpp
index c395d96cf..7827e324c 100644
--- a/src/input_common/sdl/sdl_impl.cpp
+++ b/src/input_common/sdl/sdl_impl.cpp
@@ -400,7 +400,8 @@ public:
400 return joystick->RumblePlay(0, 0); 400 return joystick->RumblePlay(0, 0);
401 } 401 }
402 402
403 bool SetRumblePlay(f32 amp_low, f32 freq_low, f32 amp_high, f32 freq_high) const override { 403 bool SetRumblePlay(f32 amp_low, [[maybe_unused]] f32 freq_low, f32 amp_high,
404 [[maybe_unused]] f32 freq_high) const override {
404 const auto process_amplitude = [](f32 amplitude) { 405 const auto process_amplitude = [](f32 amplitude) {
405 return static_cast<u16>((amplitude + std::pow(amplitude, 0.3f)) * 0.5f * 0xFFFF); 406 return static_cast<u16>((amplitude + std::pow(amplitude, 0.3f)) * 0.5f * 0xFFFF);
406 }; 407 };
@@ -864,6 +865,8 @@ Common::ParamPackage SDLEventToMotionParamPackage(SDLState& state, const SDL_Eve
864Common::ParamPackage BuildParamPackageForBinding(int port, const std::string& guid, 865Common::ParamPackage BuildParamPackageForBinding(int port, const std::string& guid,
865 const SDL_GameControllerButtonBind& binding) { 866 const SDL_GameControllerButtonBind& binding) {
866 switch (binding.bindType) { 867 switch (binding.bindType) {
868 case SDL_CONTROLLER_BINDTYPE_NONE:
869 break;
867 case SDL_CONTROLLER_BINDTYPE_AXIS: 870 case SDL_CONTROLLER_BINDTYPE_AXIS:
868 return BuildAnalogParamPackageForButton(port, guid, binding.value.axis); 871 return BuildAnalogParamPackageForButton(port, guid, binding.value.axis);
869 case SDL_CONTROLLER_BINDTYPE_BUTTON: 872 case SDL_CONTROLLER_BINDTYPE_BUTTON:
@@ -984,7 +987,7 @@ class SDLPoller : public InputCommon::Polling::DevicePoller {
984public: 987public:
985 explicit SDLPoller(SDLState& state_) : state(state_) {} 988 explicit SDLPoller(SDLState& state_) : state(state_) {}
986 989
987 void Start(const std::string& device_id) override { 990 void Start([[maybe_unused]] const std::string& device_id) override {
988 state.event_queue.Clear(); 991 state.event_queue.Clear();
989 state.polling = true; 992 state.polling = true;
990 } 993 }