diff options
| -rw-r--r-- | src/input_common/input_engine.h | 2 | ||||
| -rw-r--r-- | src/input_common/main.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/input_common/input_engine.h b/src/input_common/input_engine.h index 390581c94..5d4fdb4cc 100644 --- a/src/input_common/input_engine.h +++ b/src/input_common/input_engine.h | |||
| @@ -89,7 +89,7 @@ struct UpdateCallback { | |||
| 89 | 89 | ||
| 90 | // Triggered if data changed on the controller and the engine is on configuring mode | 90 | // Triggered if data changed on the controller and the engine is on configuring mode |
| 91 | struct MappingCallback { | 91 | struct MappingCallback { |
| 92 | std::function<void(MappingData)> on_data; | 92 | std::function<void(const MappingData&)> on_data; |
| 93 | }; | 93 | }; |
| 94 | 94 | ||
| 95 | // Input Identifier of data source | 95 | // Input Identifier of data source |
diff --git a/src/input_common/main.cpp b/src/input_common/main.cpp index 940744c5f..e2b415bf6 100644 --- a/src/input_common/main.cpp +++ b/src/input_common/main.cpp | |||
| @@ -27,7 +27,7 @@ namespace InputCommon { | |||
| 27 | struct InputSubsystem::Impl { | 27 | struct InputSubsystem::Impl { |
| 28 | void Initialize() { | 28 | void Initialize() { |
| 29 | mapping_factory = std::make_shared<MappingFactory>(); | 29 | mapping_factory = std::make_shared<MappingFactory>(); |
| 30 | MappingCallback mapping_callback{[this](MappingData data) { RegisterInput(data); }}; | 30 | MappingCallback mapping_callback{[this](const MappingData& data) { RegisterInput(data); }}; |
| 31 | 31 | ||
| 32 | keyboard = std::make_shared<Keyboard>("keyboard"); | 32 | keyboard = std::make_shared<Keyboard>("keyboard"); |
| 33 | keyboard->SetMappingCallback(mapping_callback); | 33 | keyboard->SetMappingCallback(mapping_callback); |
| @@ -284,7 +284,7 @@ struct InputSubsystem::Impl { | |||
| 284 | #endif | 284 | #endif |
| 285 | } | 285 | } |
| 286 | 286 | ||
| 287 | void RegisterInput(MappingData data) { | 287 | void RegisterInput(const MappingData& data) { |
| 288 | mapping_factory->RegisterInput(data); | 288 | mapping_factory->RegisterInput(data); |
| 289 | } | 289 | } |
| 290 | 290 | ||