mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-07-21 11:05:46 +00:00
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.
This commit is contained in:
parent
c005d24e1e
commit
0862aabdc6
7 changed files with 102 additions and 90 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue