diff options
Diffstat (limited to 'src/input_common')
| -rw-r--r-- | src/input_common/main.cpp | 4 | ||||
| -rw-r--r-- | src/input_common/mouse/mouse_poller.cpp | 2 | ||||
| -rw-r--r-- | src/input_common/sdl/sdl_impl.h | 8 |
3 files changed, 3 insertions, 11 deletions
diff --git a/src/input_common/main.cpp b/src/input_common/main.cpp index 7399c3648..8de3d4520 100644 --- a/src/input_common/main.cpp +++ b/src/input_common/main.cpp | |||
| @@ -294,8 +294,8 @@ void InputSubsystem::ReloadInputDevices() { | |||
| 294 | impl->udp->ReloadSockets(); | 294 | impl->udp->ReloadSockets(); |
| 295 | } | 295 | } |
| 296 | 296 | ||
| 297 | std::vector<std::unique_ptr<Polling::DevicePoller>> InputSubsystem::GetPollers( | 297 | std::vector<std::unique_ptr<Polling::DevicePoller>> InputSubsystem::GetPollers([ |
| 298 | Polling::DeviceType type) const { | 298 | [maybe_unused]] Polling::DeviceType type) const { |
| 299 | #ifdef HAVE_SDL2 | 299 | #ifdef HAVE_SDL2 |
| 300 | return impl->sdl->GetPollers(type); | 300 | return impl->sdl->GetPollers(type); |
| 301 | #else | 301 | #else |
diff --git a/src/input_common/mouse/mouse_poller.cpp b/src/input_common/mouse/mouse_poller.cpp index 45b3d7340..efcdd85d2 100644 --- a/src/input_common/mouse/mouse_poller.cpp +++ b/src/input_common/mouse/mouse_poller.cpp | |||
| @@ -84,7 +84,7 @@ public: | |||
| 84 | std::lock_guard lock{mutex}; | 84 | std::lock_guard lock{mutex}; |
| 85 | const auto axis_value = | 85 | const auto axis_value = |
| 86 | static_cast<float>(mouse_input->GetMouseState(button).axis.at(axis)); | 86 | static_cast<float>(mouse_input->GetMouseState(button).axis.at(axis)); |
| 87 | const float sensitivity = Settings::values.mouse_panning_sensitivity.GetValue(); | 87 | const float sensitivity = Settings::values.mouse_panning_sensitivity.GetValue() * 0.10f; |
| 88 | return axis_value * sensitivity / (100.0f * range); | 88 | return axis_value * sensitivity / (100.0f * range); |
| 89 | } | 89 | } |
| 90 | 90 | ||
diff --git a/src/input_common/sdl/sdl_impl.h b/src/input_common/sdl/sdl_impl.h index b77afcbd8..7a9ad6346 100644 --- a/src/input_common/sdl/sdl_impl.h +++ b/src/input_common/sdl/sdl_impl.h | |||
| @@ -10,15 +10,7 @@ | |||
| 10 | #include <thread> | 10 | #include <thread> |
| 11 | #include <unordered_map> | 11 | #include <unordered_map> |
| 12 | 12 | ||
| 13 | // Ignore -Wimplicit-fallthrough due to https://github.com/libsdl-org/SDL/issues/4307 | ||
| 14 | #ifdef __GNUC__ | ||
| 15 | #pragma GCC diagnostic push | ||
| 16 | #pragma GCC diagnostic ignored "-Wimplicit-fallthrough" | ||
| 17 | #endif | ||
| 18 | #include <SDL.h> | 13 | #include <SDL.h> |
| 19 | #ifdef __GNUC__ | ||
| 20 | #pragma GCC diagnostic pop | ||
| 21 | #endif | ||
| 22 | 14 | ||
| 23 | #include "common/common_types.h" | 15 | #include "common/common_types.h" |
| 24 | #include "common/threadsafe_queue.h" | 16 | #include "common/threadsafe_queue.h" |