mirror of
https://github.com/yuzu-mirror/yuzu
synced 2024-11-23 18:03:05 +00:00
sdl_impl: Mark FromEvent() as a const member function
This doesn't modify internal member state, so it can be marked as const.
This commit is contained in:
parent
57d9ef5a89
commit
2680526e6b
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue