summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2019-06-03 22:15:30 +0200
committerLioncash <mathew1800@gmail.com>2019-06-03 22:56:46 +0200
commit2c679cda51c2cde11e83391a578499f2118a1347 (patch)
tree5a9bffcbb4115f6294cd540ead9b6832d68cbad7
parentinput_common/sdl/sdl_impl: Simplify SDL_Joystick deleter handling (diff)
downloadyuzu-2c679cda51c2cde11e83391a578499f2118a1347.tar
yuzu-2c679cda51c2cde11e83391a578499f2118a1347.tar.gz
yuzu-2c679cda51c2cde11e83391a578499f2118a1347.tar.bz2
yuzu-2c679cda51c2cde11e83391a578499f2118a1347.tar.lz
yuzu-2c679cda51c2cde11e83391a578499f2118a1347.tar.xz
yuzu-2c679cda51c2cde11e83391a578499f2118a1347.tar.zst
yuzu-2c679cda51c2cde11e83391a578499f2118a1347.zip
Diffstat (limited to '')
-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 f19a353c3..edd4affe2 100644
--- a/src/input_common/sdl/sdl_impl.cpp
+++ b/src/input_common/sdl/sdl_impl.cpp
@@ -51,7 +51,7 @@ public:
void SetButton(int button, bool value) {
std::lock_guard lock{mutex};
- state.buttons[button] = value;
+ state.buttons.insert_or_assign(button, value);
}
bool GetButton(int button) const {
@@ -61,7 +61,7 @@ public:
void SetAxis(int axis, Sint16 value) {
std::lock_guard lock{mutex};
- state.axes[axis] = value;
+ state.axes.insert_or_assign(axis, value);
}
float GetAxis(int axis) const {
@@ -88,7 +88,7 @@ public:
void SetHat(int hat, Uint8 direction) {
std::lock_guard lock{mutex};
- state.hats[hat] = direction;
+ state.hats.insert_or_assign(hat, direction);
}
bool GetHatDirection(int hat, Uint8 direction) const {