summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2022-01-24 17:31:40 +0100
committerLioncash <mathew1800@gmail.com>2022-01-24 17:31:43 +0100
commit51dd3da11ce169fec831fef20efc73d2ba495702 (patch)
treeaabd97325b9feb30ff544beb8361314ad225d356
parentMerge pull request #7761 from v1993/patch-8 (diff)
downloadyuzu-51dd3da11ce169fec831fef20efc73d2ba495702.tar
yuzu-51dd3da11ce169fec831fef20efc73d2ba495702.tar.gz
yuzu-51dd3da11ce169fec831fef20efc73d2ba495702.tar.bz2
yuzu-51dd3da11ce169fec831fef20efc73d2ba495702.tar.lz
yuzu-51dd3da11ce169fec831fef20efc73d2ba495702.tar.xz
yuzu-51dd3da11ce169fec831fef20efc73d2ba495702.tar.zst
yuzu-51dd3da11ce169fec831fef20efc73d2ba495702.zip
-rw-r--r--src/input_common/input_engine.h2
-rw-r--r--src/input_common/main.cpp4
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 {
// Triggered if data changed on the controller and the engine is on configuring mode
struct MappingCallback {
- std::function<void(MappingData)> on_data;
+ std::function<void(const MappingData&)> on_data;
};
// 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 {
struct InputSubsystem::Impl {
void Initialize() {
mapping_factory = std::make_shared<MappingFactory>();
- MappingCallback mapping_callback{[this](MappingData data) { RegisterInput(data); }};
+ MappingCallback mapping_callback{[this](const MappingData& data) { RegisterInput(data); }};
keyboard = std::make_shared<Keyboard>("keyboard");
keyboard->SetMappingCallback(mapping_callback);
@@ -284,7 +284,7 @@ struct InputSubsystem::Impl {
#endif
}
- void RegisterInput(MappingData data) {
+ void RegisterInput(const MappingData& data) {
mapping_factory->RegisterInput(data);
}