summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2020-08-29 02:58:29 +0200
committerLioncash <mathew1800@gmail.com>2020-08-29 02:58:49 +0200
commit2680526e6ba1240363297c9ec34dbde807229d72 (patch)
treee32bb82e2cba38dbb4c29f5f85add400862a4e3d /src
parentMerge pull request #4600 from lioncash/prototype (diff)
downloadyuzu-2680526e6ba1240363297c9ec34dbde807229d72.tar
yuzu-2680526e6ba1240363297c9ec34dbde807229d72.tar.gz
yuzu-2680526e6ba1240363297c9ec34dbde807229d72.tar.bz2
yuzu-2680526e6ba1240363297c9ec34dbde807229d72.tar.lz
yuzu-2680526e6ba1240363297c9ec34dbde807229d72.tar.xz
yuzu-2680526e6ba1240363297c9ec34dbde807229d72.tar.zst
yuzu-2680526e6ba1240363297c9ec34dbde807229d72.zip
Diffstat (limited to 'src')
-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:
}
return {};
}
- std::optional<Common::ParamPackage> FromEvent(const SDL_Event& event) {
+ [[nodiscard]] std::optional<Common::ParamPackage> FromEvent(const SDL_Event& event) const {
switch (event.type) {
case SDL_JOYAXISMOTION:
if (std::abs(event.jaxis.value / 32767.0) < 0.5) {
@@ -795,7 +795,7 @@ public:
case SDL_JOYHATMOTION:
return {SDLEventToButtonParamPackage(state, event)};
}
- return {};
+ return std::nullopt;
}
};