mirror of
https://github.com/yuzu-mirror/yuzu.git
synced 2024-09-08 06:59:08 +01: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 {};
|
return {};
|
||||||
}
|
}
|
||||||
std::optional<Common::ParamPackage> FromEvent(const SDL_Event& event) {
|
[[nodiscard]] std::optional<Common::ParamPackage> FromEvent(const SDL_Event& event) const {
|
||||||
switch (event.type) {
|
switch (event.type) {
|
||||||
case SDL_JOYAXISMOTION:
|
case SDL_JOYAXISMOTION:
|
||||||
if (std::abs(event.jaxis.value / 32767.0) < 0.5) {
|
if (std::abs(event.jaxis.value / 32767.0) < 0.5) {
|
||||||
|
@ -795,7 +795,7 @@ public:
|
||||||
case SDL_JOYHATMOTION:
|
case SDL_JOYHATMOTION:
|
||||||
return {SDLEventToButtonParamPackage(state, event)};
|
return {SDLEventToButtonParamPackage(state, event)};
|
||||||
}
|
}
|
||||||
return {};
|
return std::nullopt;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue