summaryrefslogtreecommitdiff
path: root/src/core/hid/emulated_console.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hid/emulated_console.h')
-rw-r--r--src/core/hid/emulated_console.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/core/hid/emulated_console.h b/src/core/hid/emulated_console.h
index f26f24f2e..9aec482a6 100644
--- a/src/core/hid/emulated_console.h
+++ b/src/core/hid/emulated_console.h
@@ -4,10 +4,13 @@
4 4
5#pragma once 5#pragma once
6 6
7#include <array>
7#include <functional> 8#include <functional>
9#include <memory>
8#include <mutex> 10#include <mutex>
9#include <unordered_map> 11#include <unordered_map>
10 12
13#include "common/common_types.h"
11#include "common/input.h" 14#include "common/input.h"
12#include "common/param_package.h" 15#include "common/param_package.h"
13#include "common/point.h" 16#include "common/point.h"
@@ -20,18 +23,18 @@
20namespace Core::HID { 23namespace Core::HID {
21 24
22struct ConsoleMotionInfo { 25struct ConsoleMotionInfo {
23 Input::MotionStatus raw_status{}; 26 Common::Input::MotionStatus raw_status{};
24 MotionInput emulated{}; 27 MotionInput emulated{};
25}; 28};
26 29
27using ConsoleMotionDevices = std::unique_ptr<Input::InputDevice>; 30using ConsoleMotionDevices = std::unique_ptr<Common::Input::InputDevice>;
28using TouchDevices = std::array<std::unique_ptr<Input::InputDevice>, 16>; 31using TouchDevices = std::array<std::unique_ptr<Common::Input::InputDevice>, 16>;
29 32
30using ConsoleMotionParams = Common::ParamPackage; 33using ConsoleMotionParams = Common::ParamPackage;
31using TouchParams = std::array<Common::ParamPackage, 16>; 34using TouchParams = std::array<Common::ParamPackage, 16>;
32 35
33using ConsoleMotionValues = ConsoleMotionInfo; 36using ConsoleMotionValues = ConsoleMotionInfo;
34using TouchValues = std::array<Input::TouchStatus, 16>; 37using TouchValues = std::array<Common::Input::TouchStatus, 16>;
35 38
36struct TouchFinger { 39struct TouchFinger {
37 u64 last_touch{}; 40 u64 last_touch{};
@@ -151,14 +154,14 @@ private:
151 * Updates the motion status of the console 154 * Updates the motion status of the console
152 * @param A CallbackStatus containing gyro and accelerometer data 155 * @param A CallbackStatus containing gyro and accelerometer data
153 */ 156 */
154 void SetMotion(Input::CallbackStatus callback); 157 void SetMotion(Common::Input::CallbackStatus callback);
155 158
156 /** 159 /**
157 * Updates the touch status of the console 160 * Updates the touch status of the console
158 * @param callback: A CallbackStatus containing the touch position 161 * @param callback: A CallbackStatus containing the touch position
159 * @param index: Finger ID to be updated 162 * @param index: Finger ID to be updated
160 */ 163 */
161 void SetTouch(Input::CallbackStatus callback, std::size_t index); 164 void SetTouch(Common::Input::CallbackStatus callback, std::size_t index);
162 165
163 /** 166 /**
164 * Triggers a callback that something has changed on the console status 167 * Triggers a callback that something has changed on the console status