summaryrefslogtreecommitdiff
path: root/src/core/hid/emulated_console.cpp
diff options
context:
space:
mode:
authorGravatar Lioncash2022-11-28 09:19:01 -0500
committerGravatar Lioncash2022-11-28 10:00:37 -0500
commit2ec7d0b5fda0fe6cbafcc235e3d8cc91b0dc81e0 (patch)
treec61fdcf120b96a0487e24f16c6f48b5fb44fafb5 /src/core/hid/emulated_console.cpp
parentcommon/input: Pass ParamPackage by const reference in CreateDevice (diff)
downloadyuzu-2ec7d0b5fda0fe6cbafcc235e3d8cc91b0dc81e0.tar.gz
yuzu-2ec7d0b5fda0fe6cbafcc235e3d8cc91b0dc81e0.tar.xz
yuzu-2ec7d0b5fda0fe6cbafcc235e3d8cc91b0dc81e0.zip
common/input: Add helpers functions for creating input and output devices
Avoids the redundancy of needing to explictly specify the common namespace and the type.
Diffstat (limited to 'src/core/hid/emulated_console.cpp')
-rw-r--r--src/core/hid/emulated_console.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/hid/emulated_console.cpp b/src/core/hid/emulated_console.cpp
index fb7e5802a..b6c8cc58d 100644
--- a/src/core/hid/emulated_console.cpp
+++ b/src/core/hid/emulated_console.cpp
@@ -68,7 +68,7 @@ void EmulatedConsole::ReloadInput() {
68 // If you load any device here add the equivalent to the UnloadInput() function 68 // If you load any device here add the equivalent to the UnloadInput() function
69 SetTouchParams(); 69 SetTouchParams();
70 70
71 motion_devices = Common::Input::CreateDevice<Common::Input::InputDevice>(motion_params); 71 motion_devices = Common::Input::CreateInputDevice(motion_params);
72 if (motion_devices) { 72 if (motion_devices) {
73 motion_devices->SetCallback({ 73 motion_devices->SetCallback({
74 .on_change = 74 .on_change =
@@ -79,7 +79,7 @@ void EmulatedConsole::ReloadInput() {
79 // Unique index for identifying touch device source 79 // Unique index for identifying touch device source
80 std::size_t index = 0; 80 std::size_t index = 0;
81 for (auto& touch_device : touch_devices) { 81 for (auto& touch_device : touch_devices) {
82 touch_device = Common::Input::CreateDevice<Common::Input::InputDevice>(touch_params[index]); 82 touch_device = Common::Input::CreateInputDevice(touch_params[index]);
83 if (!touch_device) { 83 if (!touch_device) {
84 continue; 84 continue;
85 } 85 }