summaryrefslogtreecommitdiff
path: root/src/input_common/sdl/sdl_impl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/input_common/sdl/sdl_impl.cpp')
-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:
51 51
52 void SetButton(int button, bool value) { 52 void SetButton(int button, bool value) {
53 std::lock_guard lock{mutex}; 53 std::lock_guard lock{mutex};
54 state.buttons[button] = value; 54 state.buttons.insert_or_assign(button, value);
55 } 55 }
56 56
57 bool GetButton(int button) const { 57 bool GetButton(int button) const {
@@ -61,7 +61,7 @@ public:
61 61
62 void SetAxis(int axis, Sint16 value) { 62 void SetAxis(int axis, Sint16 value) {
63 std::lock_guard lock{mutex}; 63 std::lock_guard lock{mutex};
64 state.axes[axis] = value; 64 state.axes.insert_or_assign(axis, value);
65 } 65 }
66 66
67 float GetAxis(int axis) const { 67 float GetAxis(int axis) const {
@@ -88,7 +88,7 @@ public:
88 88
89 void SetHat(int hat, Uint8 direction) { 89 void SetHat(int hat, Uint8 direction) {
90 std::lock_guard lock{mutex}; 90 std::lock_guard lock{mutex};
91 state.hats[hat] = direction; 91 state.hats.insert_or_assign(hat, direction);
92 } 92 }
93 93
94 bool GetHatDirection(int hat, Uint8 direction) const { 94 bool GetHatDirection(int hat, Uint8 direction) const {