summaryrefslogtreecommitdiff
path: root/src/input_common/sdl/sdl_impl.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/input_common/sdl/sdl_impl.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/input_common/sdl/sdl_impl.cpp b/src/input_common/sdl/sdl_impl.cpp
index c8d9eb2bc..43fac7650 100644
--- a/src/input_common/sdl/sdl_impl.cpp
+++ b/src/input_common/sdl/sdl_impl.cpp
@@ -784,7 +784,7 @@ public:
784 } 784 }
785 return {}; 785 return {};
786 } 786 }
787 std::optional<Common::ParamPackage> FromEvent(const SDL_Event& event) { 787 [[nodiscard]] std::optional<Common::ParamPackage> FromEvent(const SDL_Event& event) const {
788 switch (event.type) { 788 switch (event.type) {
789 case SDL_JOYAXISMOTION: 789 case SDL_JOYAXISMOTION:
790 if (std::abs(event.jaxis.value / 32767.0) < 0.5) { 790 if (std::abs(event.jaxis.value / 32767.0) < 0.5) {
@@ -795,7 +795,7 @@ public:
795 case SDL_JOYHATMOTION: 795 case SDL_JOYHATMOTION:
796 return {SDLEventToButtonParamPackage(state, event)}; 796 return {SDLEventToButtonParamPackage(state, event)};
797 } 797 }
798 return {}; 798 return std::nullopt;
799 } 799 }
800}; 800};
801 801