diff options
Diffstat (limited to 'src/core/hid')
-rw-r--r-- | src/core/hid/emulated_console.cpp | 4 | ||||
-rw-r--r-- | src/core/hid/emulated_controller.cpp | 20 | ||||
-rw-r--r-- | src/core/hid/emulated_devices.cpp | 14 |
3 files changed, 19 insertions, 19 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() { // If you load any device here add the equivalent to the UnloadInput() function SetTouchParams(); - motion_devices = Common::Input::CreateDevice<Common::Input::InputDevice>(motion_params); + motion_devices = Common::Input::CreateInputDevice(motion_params); if (motion_devices) { motion_devices->SetCallback({ .on_change = @@ -79,7 +79,7 @@ void EmulatedConsole::ReloadInput() { // Unique index for identifying touch device source std::size_t index = 0; for (auto& touch_device : touch_devices) { - touch_device = Common::Input::CreateDevice<Common::Input::InputDevice>(touch_params[index]); + touch_device = Common::Input::CreateInputDevice(touch_params[index]); if (!touch_device) { continue; } diff --git a/src/core/hid/emulated_controller.cpp b/src/core/hid/emulated_controller.cpp index ec1364452..b3188f256 100644 --- a/src/core/hid/emulated_controller.cpp +++ b/src/core/hid/emulated_controller.cpp @@ -146,27 +146,27 @@ void EmulatedController::LoadDevices() { std::transform(button_params.begin() + Settings::NativeButton::BUTTON_HID_BEGIN, button_params.begin() + Settings::NativeButton::BUTTON_NS_END, - button_devices.begin(), Common::Input::CreateDevice<Common::Input::InputDevice>); + button_devices.begin(), Common::Input::CreateInputDevice); std::transform(stick_params.begin() + Settings::NativeAnalog::STICK_HID_BEGIN, stick_params.begin() + Settings::NativeAnalog::STICK_HID_END, - stick_devices.begin(), Common::Input::CreateDevice<Common::Input::InputDevice>); + stick_devices.begin(), Common::Input::CreateInputDevice); std::transform(motion_params.begin() + Settings::NativeMotion::MOTION_HID_BEGIN, motion_params.begin() + Settings::NativeMotion::MOTION_HID_END, - motion_devices.begin(), Common::Input::CreateDevice<Common::Input::InputDevice>); + motion_devices.begin(), Common::Input::CreateInputDevice); std::transform(trigger_params.begin(), trigger_params.end(), trigger_devices.begin(), - Common::Input::CreateDevice<Common::Input::InputDevice>); + Common::Input::CreateInputDevice); std::transform(battery_params.begin(), battery_params.end(), battery_devices.begin(), - Common::Input::CreateDevice<Common::Input::InputDevice>); - camera_devices = Common::Input::CreateDevice<Common::Input::InputDevice>(camera_params); - nfc_devices = Common::Input::CreateDevice<Common::Input::InputDevice>(nfc_params); + Common::Input::CreateInputDevice); + camera_devices = Common::Input::CreateInputDevice(camera_params); + nfc_devices = Common::Input::CreateInputDevice(nfc_params); std::transform(output_params.begin(), output_params.end(), output_devices.begin(), - Common::Input::CreateDevice<Common::Input::OutputDevice>); + Common::Input::CreateOutputDevice); // Initialize TAS devices std::transform(tas_button_params.begin(), tas_button_params.end(), tas_button_devices.begin(), - Common::Input::CreateDevice<Common::Input::InputDevice>); + Common::Input::CreateInputDevice); std::transform(tas_stick_params.begin(), tas_stick_params.end(), tas_stick_devices.begin(), - Common::Input::CreateDevice<Common::Input::InputDevice>); + Common::Input::CreateInputDevice); } void EmulatedController::LoadTASParams() { diff --git a/src/core/hid/emulated_devices.cpp b/src/core/hid/emulated_devices.cpp index 658dbd318..e421828d2 100644 --- a/src/core/hid/emulated_devices.cpp +++ b/src/core/hid/emulated_devices.cpp @@ -25,12 +25,12 @@ void EmulatedDevices::ReloadInput() { Common::ParamPackage mouse_params; mouse_params.Set("engine", "mouse"); mouse_params.Set("button", static_cast<int>(key_index)); - mouse_device = Common::Input::CreateDevice<Common::Input::InputDevice>(mouse_params); + mouse_device = Common::Input::CreateInputDevice(mouse_params); key_index++; } - mouse_stick_device = Common::Input::CreateDeviceFromString<Common::Input::InputDevice>( - "engine:mouse,axis_x:0,axis_y:1"); + mouse_stick_device = + Common::Input::CreateInputDeviceFromString("engine:mouse,axis_x:0,axis_y:1"); // First two axis are reserved for mouse position key_index = 2; @@ -38,7 +38,7 @@ void EmulatedDevices::ReloadInput() { Common::ParamPackage mouse_params; mouse_params.Set("engine", "mouse"); mouse_params.Set("axis", static_cast<int>(key_index)); - mouse_device = Common::Input::CreateDevice<Common::Input::InputDevice>(mouse_params); + mouse_device = Common::Input::CreateInputDevice(mouse_params); key_index++; } @@ -50,7 +50,7 @@ void EmulatedDevices::ReloadInput() { keyboard_params.Set("button", static_cast<int>(key_index)); keyboard_params.Set("port", 1); keyboard_params.Set("pad", 0); - keyboard_device = Common::Input::CreateDevice<Common::Input::InputDevice>(keyboard_params); + keyboard_device = Common::Input::CreateInputDevice(keyboard_params); key_index++; } @@ -62,11 +62,11 @@ void EmulatedDevices::ReloadInput() { keyboard_params.Set("button", static_cast<int>(key_index)); keyboard_params.Set("port", 1); keyboard_params.Set("pad", 1); - keyboard_device = Common::Input::CreateDevice<Common::Input::InputDevice>(keyboard_params); + keyboard_device = Common::Input::CreateInputDevice(keyboard_params); key_index++; } - ring_analog_device = Common::Input::CreateDevice<Common::Input::InputDevice>(ring_params); + ring_analog_device = Common::Input::CreateInputDevice(ring_params); for (std::size_t index = 0; index < mouse_button_devices.size(); ++index) { if (!mouse_button_devices[index]) { |