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.h28
1 files changed, 15 insertions, 13 deletions
diff --git a/src/core/hid/emulated_console.h b/src/core/hid/emulated_console.h
index 25c183eee..bb3d7ab90 100644
--- a/src/core/hid/emulated_console.h
+++ b/src/core/hid/emulated_console.h
@@ -78,9 +78,9 @@ struct ConsoleUpdateCallback {
78class EmulatedConsole { 78class EmulatedConsole {
79public: 79public:
80 /** 80 /**
81 * Contains all input data related to the console like motion and touch input 81 * Contains all input data within the emulated switch console tablet such as touch and motion
82 */ 82 */
83 EmulatedConsole(); 83 explicit EmulatedConsole();
84 ~EmulatedConsole(); 84 ~EmulatedConsole();
85 85
86 YUZU_NON_COPYABLE(EmulatedConsole); 86 YUZU_NON_COPYABLE(EmulatedConsole);
@@ -89,14 +89,16 @@ public:
89 /// Removes all callbacks created from input devices 89 /// Removes all callbacks created from input devices
90 void UnloadInput(); 90 void UnloadInput();
91 91
92 /// Sets the emulated console into configuring mode. Locking all HID service events from being 92 /**
93 /// moddified 93 * Sets the emulated console into configuring mode
94 * This prevents the modification of the HID state of the emulated console by input commands
95 */
94 void EnableConfiguration(); 96 void EnableConfiguration();
95 97
96 /// Returns the emulated console to the normal behaivour 98 /// Returns the emulated console into normal mode, allowing the modification of the HID state
97 void DisableConfiguration(); 99 void DisableConfiguration();
98 100
99 /// Returns true if the emulated console is on configuring mode 101 /// Returns true if the emulated console is in configuring mode
100 bool IsConfiguring() const; 102 bool IsConfiguring() const;
101 103
102 /// Reload all input devices 104 /// Reload all input devices
@@ -116,7 +118,7 @@ public:
116 118
117 /** 119 /**
118 * Updates the current mapped motion device 120 * Updates the current mapped motion device
119 * @param ParamPackage with controller data to be mapped 121 * @param param ParamPackage with controller data to be mapped
120 */ 122 */
121 void SetMotionParam(Common::ParamPackage param); 123 void SetMotionParam(Common::ParamPackage param);
122 124
@@ -134,14 +136,14 @@ public:
134 136
135 /** 137 /**
136 * Adds a callback to the list of events 138 * Adds a callback to the list of events
137 * @param ConsoleUpdateCallback that will be triggered 139 * @param update_callback A ConsoleUpdateCallback that will be triggered
138 * @return an unique key corresponding to the callback index in the list 140 * @return an unique key corresponding to the callback index in the list
139 */ 141 */
140 int SetCallback(ConsoleUpdateCallback update_callback); 142 int SetCallback(ConsoleUpdateCallback update_callback);
141 143
142 /** 144 /**
143 * Removes a callback from the list stopping any future events to this object 145 * Removes a callback from the list stopping any future events to this object
144 * @param Key corresponding to the callback index in the list 146 * @param key Key corresponding to the callback index in the list
145 */ 147 */
146 void DeleteCallback(int key); 148 void DeleteCallback(int key);
147 149
@@ -151,20 +153,20 @@ private:
151 153
152 /** 154 /**
153 * Updates the motion status of the console 155 * Updates the motion status of the console
154 * @param A CallbackStatus containing gyro and accelerometer data 156 * @param callback A CallbackStatus containing gyro and accelerometer data
155 */ 157 */
156 void SetMotion(Common::Input::CallbackStatus callback); 158 void SetMotion(Common::Input::CallbackStatus callback);
157 159
158 /** 160 /**
159 * Updates the touch status of the console 161 * Updates the touch status of the console
160 * @param callback: A CallbackStatus containing the touch position 162 * @param callback A CallbackStatus containing the touch position
161 * @param index: Finger ID to be updated 163 * @param index Finger ID to be updated
162 */ 164 */
163 void SetTouch(Common::Input::CallbackStatus callback, std::size_t index); 165 void SetTouch(Common::Input::CallbackStatus callback, std::size_t index);
164 166
165 /** 167 /**
166 * Triggers a callback that something has changed on the console status 168 * Triggers a callback that something has changed on the console status
167 * @param Input type of the event to trigger 169 * @param type Input type of the event to trigger
168 */ 170 */
169 void TriggerOnChange(ConsoleTriggerType type); 171 void TriggerOnChange(ConsoleTriggerType type);
170 172