aboutsummaryrefslogtreecommitdiff
path: root/src/core/hid/emulated_console.cpp
diff options
context:
space:
mode:
authorgerman77 <juangerman-13@hotmail.com>2021-10-30 22:23:10 -0500
committerNarr the Reg <juangerman-13@hotmail.com>2021-11-24 20:30:26 -0600
commit2b1b0c2a30e242b08ec120e09803ec54d5445703 (patch)
tree9a10400a7e4403b288eee3aae8a52f1d5be912de /src/core/hid/emulated_console.cpp
parent61d9eb9f690d6afe141f24ba75c99b54e122dfa3 (diff)
kraken: Address comments from review
start lion review
Diffstat (limited to 'src/core/hid/emulated_console.cpp')
-rw-r--r--src/core/hid/emulated_console.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/core/hid/emulated_console.cpp b/src/core/hid/emulated_console.cpp
index d1d4a5355..c259de0f1 100644
--- a/src/core/hid/emulated_console.cpp
+++ b/src/core/hid/emulated_console.cpp
@@ -55,21 +55,21 @@ void EmulatedConsole::SetTouchParams() {
void EmulatedConsole::ReloadInput() {
SetTouchParams();
- motion_devices = Input::CreateDevice<Input::InputDevice>(motion_params);
+ motion_devices = Common::Input::CreateDevice<Common::Input::InputDevice>(motion_params);
if (motion_devices) {
- Input::InputCallback motion_callback{
- [this](Input::CallbackStatus callback) { SetMotion(callback); }};
+ Common::Input::InputCallback motion_callback{
+ [this](Common::Input::CallbackStatus callback) { SetMotion(callback); }};
motion_devices->SetCallback(motion_callback);
}
std::size_t index = 0;
for (auto& touch_device : touch_devices) {
- touch_device = Input::CreateDevice<Input::InputDevice>(touch_params[index]);
+ touch_device = Common::Input::CreateDevice<Common::Input::InputDevice>(touch_params[index]);
if (!touch_device) {
continue;
}
- Input::InputCallback touch_callback{
- [this, index](Input::CallbackStatus callback) { SetTouch(callback, index); }};
+ Common::Input::InputCallback touch_callback{
+ [this, index](Common::Input::CallbackStatus callback) { SetTouch(callback, index); }};
touch_device->SetCallback(touch_callback);
index++;
}
@@ -117,7 +117,7 @@ void EmulatedConsole::SetMotionParam(Common::ParamPackage param) {
ReloadInput();
}
-void EmulatedConsole::SetMotion(Input::CallbackStatus callback) {
+void EmulatedConsole::SetMotion(Common::Input::CallbackStatus callback) {
std::lock_guard lock{mutex};
auto& raw_status = console.motion_values.raw_status;
auto& emulated = console.motion_values.emulated;
@@ -152,7 +152,8 @@ void EmulatedConsole::SetMotion(Input::CallbackStatus callback) {
TriggerOnChange(ConsoleTriggerType::Motion);
}
-void EmulatedConsole::SetTouch(Input::CallbackStatus callback, [[maybe_unused]] std::size_t index) {
+void EmulatedConsole::SetTouch(Common::Input::CallbackStatus callback,
+ [[maybe_unused]] std::size_t index) {
if (index >= console.touch_values.size()) {
return;
}