summaryrefslogtreecommitdiff
path: root/src/core/hid/emulated_controller.cpp
diff options
context:
space:
mode:
authorGravatar bunnei2022-02-10 21:52:13 -0700
committerGravatar GitHub2022-02-10 21:52:13 -0700
commitca9da569ce8d5ce8106ff69afce484d9516570a8 (patch)
treedb8f98fcfcd3d3d77f77c52b3be696c073f90f6e /src/core/hid/emulated_controller.cpp
parentMerge pull request #7861 from german77/user_features (diff)
parentcommon: uuid: Use sizeof(u64) instead of 8 in Hash() (diff)
downloadyuzu-ca9da569ce8d5ce8106ff69afce484d9516570a8.tar.gz
yuzu-ca9da569ce8d5ce8106ff69afce484d9516570a8.tar.xz
yuzu-ca9da569ce8d5ce8106ff69afce484d9516570a8.zip
Merge pull request #7852 from Morph1984/new-uuid
common: Revise and fix the UUID implementation
Diffstat (limited to 'src/core/hid/emulated_controller.cpp')
-rw-r--r--src/core/hid/emulated_controller.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/core/hid/emulated_controller.cpp b/src/core/hid/emulated_controller.cpp
index a7cdf45e6..2bee173b3 100644
--- a/src/core/hid/emulated_controller.cpp
+++ b/src/core/hid/emulated_controller.cpp
@@ -269,7 +269,8 @@ void EmulatedController::ReloadInput() {
269 } 269 }
270 270
271 // Use a common UUID for TAS 271 // Use a common UUID for TAS
272 const auto tas_uuid = Common::UUID{0x0, 0x7A5}; 272 static constexpr Common::UUID TAS_UUID = Common::UUID{
273 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7, 0xA5, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}};
273 274
274 // Register TAS devices. No need to force update 275 // Register TAS devices. No need to force update
275 for (std::size_t index = 0; index < tas_button_devices.size(); ++index) { 276 for (std::size_t index = 0; index < tas_button_devices.size(); ++index) {
@@ -278,8 +279,8 @@ void EmulatedController::ReloadInput() {
278 } 279 }
279 tas_button_devices[index]->SetCallback({ 280 tas_button_devices[index]->SetCallback({
280 .on_change = 281 .on_change =
281 [this, index, tas_uuid](const Common::Input::CallbackStatus& callback) { 282 [this, index](const Common::Input::CallbackStatus& callback) {
282 SetButton(callback, index, tas_uuid); 283 SetButton(callback, index, TAS_UUID);
283 }, 284 },
284 }); 285 });
285 } 286 }
@@ -290,8 +291,8 @@ void EmulatedController::ReloadInput() {
290 } 291 }
291 tas_stick_devices[index]->SetCallback({ 292 tas_stick_devices[index]->SetCallback({
292 .on_change = 293 .on_change =
293 [this, index, tas_uuid](const Common::Input::CallbackStatus& callback) { 294 [this, index](const Common::Input::CallbackStatus& callback) {
294 SetStick(callback, index, tas_uuid); 295 SetStick(callback, index, TAS_UUID);
295 }, 296 },
296 }); 297 });
297 } 298 }