summaryrefslogtreecommitdiff
path: root/src/core/hid/emulated_console.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hid/emulated_console.cpp')
-rw-r--r--src/core/hid/emulated_console.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/core/hid/emulated_console.cpp b/src/core/hid/emulated_console.cpp
index b6c8cc58d..30c2e9d17 100644
--- a/src/core/hid/emulated_console.cpp
+++ b/src/core/hid/emulated_console.cpp
@@ -37,7 +37,7 @@ void EmulatedConsole::SetTouchParams() {
37 touchscreen_param.Set("axis_x", i * 2); 37 touchscreen_param.Set("axis_x", i * 2);
38 touchscreen_param.Set("axis_y", (i * 2) + 1); 38 touchscreen_param.Set("axis_y", (i * 2) + 1);
39 touchscreen_param.Set("button", i); 39 touchscreen_param.Set("button", i);
40 touch_params[index++] = touchscreen_param; 40 touch_params[index++] = std::move(touchscreen_param);
41 } 41 }
42 42
43 const auto button_index = 43 const auto button_index =
@@ -59,7 +59,7 @@ void EmulatedConsole::SetTouchParams() {
59 touch_button_params.Set("button", params.Serialize()); 59 touch_button_params.Set("button", params.Serialize());
60 touch_button_params.Set("x", x); 60 touch_button_params.Set("x", x);
61 touch_button_params.Set("y", y); 61 touch_button_params.Set("y", y);
62 touch_params[index] = touch_button_params; 62 touch_params[index] = std::move(touch_button_params);
63 index++; 63 index++;
64 } 64 }
65} 65}
@@ -131,7 +131,7 @@ Common::ParamPackage EmulatedConsole::GetMotionParam() const {
131} 131}
132 132
133void EmulatedConsole::SetMotionParam(Common::ParamPackage param) { 133void EmulatedConsole::SetMotionParam(Common::ParamPackage param) {
134 motion_params = param; 134 motion_params = std::move(param);
135 ReloadInput(); 135 ReloadInput();
136} 136}
137 137
@@ -199,7 +199,7 @@ void EmulatedConsole::SetTouch(const Common::Input::CallbackStatus& callback, st
199 199
200 if (is_new_input) { 200 if (is_new_input) {
201 touch_value.pressed.value = true; 201 touch_value.pressed.value = true;
202 touch_value.id = static_cast<u32>(index); 202 touch_value.id = static_cast<int>(index);
203 } 203 }
204 204
205 touch_value.x = touch_input.x; 205 touch_value.x = touch_input.x;
@@ -284,7 +284,7 @@ void EmulatedConsole::TriggerOnChange(ConsoleTriggerType type) {
284 284
285int EmulatedConsole::SetCallback(ConsoleUpdateCallback update_callback) { 285int EmulatedConsole::SetCallback(ConsoleUpdateCallback update_callback) {
286 std::scoped_lock lock{callback_mutex}; 286 std::scoped_lock lock{callback_mutex};
287 callback_list.insert_or_assign(last_callback_key, update_callback); 287 callback_list.insert_or_assign(last_callback_key, std::move(update_callback));
288 return last_callback_key++; 288 return last_callback_key++;
289} 289}
290 290