summaryrefslogtreecommitdiffstats
path: root/src/input_common
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2019-05-29 07:33:00 +0200
committerRodrigo Locatti <reinuseslisp@airmail.cc>2019-05-31 09:47:02 +0200
commite70f16fff793e1f3145a9ad2f4d9a704c6218144 (patch)
treed9a60226baf6c983da69fcfa9940837415b5d856 /src/input_common
parentcommon/math_util: Provide a template deduction guide for Common::Rectangle (diff)
downloadyuzu-e70f16fff793e1f3145a9ad2f4d9a704c6218144.tar
yuzu-e70f16fff793e1f3145a9ad2f4d9a704c6218144.tar.gz
yuzu-e70f16fff793e1f3145a9ad2f4d9a704c6218144.tar.bz2
yuzu-e70f16fff793e1f3145a9ad2f4d9a704c6218144.tar.lz
yuzu-e70f16fff793e1f3145a9ad2f4d9a704c6218144.tar.xz
yuzu-e70f16fff793e1f3145a9ad2f4d9a704c6218144.tar.zst
yuzu-e70f16fff793e1f3145a9ad2f4d9a704c6218144.zip
Diffstat (limited to 'src/input_common')
-rw-r--r--src/input_common/sdl/sdl_impl.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/input_common/sdl/sdl_impl.cpp b/src/input_common/sdl/sdl_impl.cpp
index 5949ecbae..0b69bfede 100644
--- a/src/input_common/sdl/sdl_impl.cpp
+++ b/src/input_common/sdl/sdl_impl.cpp
@@ -143,9 +143,9 @@ std::shared_ptr<SDLJoystick> SDLState::GetSDLJoystickByGUID(const std::string& g
std::lock_guard lock{joystick_map_mutex};
const auto it = joystick_map.find(guid);
if (it != joystick_map.end()) {
- while (it->second.size() <= port) {
- auto joystick = std::make_shared<SDLJoystick>(guid, it->second.size(), nullptr,
- [](SDL_Joystick*) {});
+ while (it->second.size() <= static_cast<std::size_t>(port)) {
+ auto joystick = std::make_shared<SDLJoystick>(guid, static_cast<int>(it->second.size()),
+ nullptr, [](SDL_Joystick*) {});
it->second.emplace_back(std::move(joystick));
}
return it->second[port];