summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/common')
-rw-r--r--src/common/input.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/input.h b/src/common/input.h
index 848ad7b81..f775a4c01 100644
--- a/src/common/input.h
+++ b/src/common/input.h
@@ -227,7 +227,7 @@ struct CallbackStatus {
227 227
228// Triggered once every input change 228// Triggered once every input change
229struct InputCallback { 229struct InputCallback {
230 std::function<void(CallbackStatus)> on_change; 230 std::function<void(const CallbackStatus&)> on_change;
231}; 231};
232 232
233/// An abstract class template for an input device (a button, an analog input, etc.). 233/// An abstract class template for an input device (a button, an analog input, etc.).
@@ -247,7 +247,7 @@ public:
247 } 247 }
248 248
249 // Triggers the function set in the callback 249 // Triggers the function set in the callback
250 void TriggerOnChange(CallbackStatus status) { 250 void TriggerOnChange(const CallbackStatus& status) {
251 if (callback.on_change) { 251 if (callback.on_change) {
252 callback.on_change(status); 252 callback.on_change(status);
253 } 253 }