diff options
Diffstat (limited to 'src/core/hid/emulated_devices.h')
| -rw-r--r-- | src/core/hid/emulated_devices.h | 40 |
1 files changed, 21 insertions, 19 deletions
diff --git a/src/core/hid/emulated_devices.h b/src/core/hid/emulated_devices.h index 05a945d08..c72327681 100644 --- a/src/core/hid/emulated_devices.h +++ b/src/core/hid/emulated_devices.h | |||
| @@ -75,9 +75,9 @@ class EmulatedDevices { | |||
| 75 | public: | 75 | public: |
| 76 | /** | 76 | /** |
| 77 | * Contains all input data related to external devices that aren't necesarily a controller | 77 | * Contains all input data related to external devices that aren't necesarily a controller |
| 78 | * like keyboard and mouse | 78 | * This includes devices such as the keyboard or mouse |
| 79 | */ | 79 | */ |
| 80 | EmulatedDevices(); | 80 | explicit EmulatedDevices(); |
| 81 | ~EmulatedDevices(); | 81 | ~EmulatedDevices(); |
| 82 | 82 | ||
| 83 | YUZU_NON_COPYABLE(EmulatedDevices); | 83 | YUZU_NON_COPYABLE(EmulatedDevices); |
| @@ -86,14 +86,16 @@ public: | |||
| 86 | /// Removes all callbacks created from input devices | 86 | /// Removes all callbacks created from input devices |
| 87 | void UnloadInput(); | 87 | void UnloadInput(); |
| 88 | 88 | ||
| 89 | /// Sets the emulated console into configuring mode. Locking all HID service events from being | 89 | /** |
| 90 | /// moddified | 90 | * Sets the emulated devices into configuring mode |
| 91 | * This prevents the modification of the HID state of the emulated devices by input commands | ||
| 92 | */ | ||
| 91 | void EnableConfiguration(); | 93 | void EnableConfiguration(); |
| 92 | 94 | ||
| 93 | /// Returns the emulated console to the normal behaivour | 95 | /// Returns the emulated devices into normal mode, allowing the modification of the HID state |
| 94 | void DisableConfiguration(); | 96 | void DisableConfiguration(); |
| 95 | 97 | ||
| 96 | /// Returns true if the emulated device is on configuring mode | 98 | /// Returns true if the emulated device is in configuring mode |
| 97 | bool IsConfiguring() const; | 99 | bool IsConfiguring() const; |
| 98 | 100 | ||
| 99 | /// Reload all input devices | 101 | /// Reload all input devices |
| @@ -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 InterfaceUpdateCallback that will be triggered | 139 | * @param update_callback InterfaceUpdateCallback 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(InterfaceUpdateCallback update_callback); | 142 | int SetCallback(InterfaceUpdateCallback 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,42 +153,42 @@ private: | |||
| 151 | 153 | ||
| 152 | /** | 154 | /** |
| 153 | * Updates the touch status of the keyboard device | 155 | * Updates the touch status of the keyboard device |
| 154 | * @param callback: A CallbackStatus containing the key status | 156 | * @param callback A CallbackStatus containing the key status |
| 155 | * @param index: key ID to be updated | 157 | * @param index key ID to be updated |
| 156 | */ | 158 | */ |
| 157 | void SetKeyboardButton(Common::Input::CallbackStatus callback, std::size_t index); | 159 | void SetKeyboardButton(Common::Input::CallbackStatus callback, std::size_t index); |
| 158 | 160 | ||
| 159 | /** | 161 | /** |
| 160 | * Updates the keyboard status of the keyboard device | 162 | * Updates the keyboard status of the keyboard device |
| 161 | * @param callback: A CallbackStatus containing the modifier key status | 163 | * @param callback A CallbackStatus containing the modifier key status |
| 162 | * @param index: modifier key ID to be updated | 164 | * @param index modifier key ID to be updated |
| 163 | */ | 165 | */ |
| 164 | void SetKeyboardModifier(Common::Input::CallbackStatus callback, std::size_t index); | 166 | void SetKeyboardModifier(Common::Input::CallbackStatus callback, std::size_t index); |
| 165 | 167 | ||
| 166 | /** | 168 | /** |
| 167 | * Updates the mouse button status of the mouse device | 169 | * Updates the mouse button status of the mouse device |
| 168 | * @param callback: A CallbackStatus containing the button status | 170 | * @param callback A CallbackStatus containing the button status |
| 169 | * @param index: Button ID to be updated | 171 | * @param index Button ID to be updated |
| 170 | */ | 172 | */ |
| 171 | void SetMouseButton(Common::Input::CallbackStatus callback, std::size_t index); | 173 | void SetMouseButton(Common::Input::CallbackStatus callback, std::size_t index); |
| 172 | 174 | ||
| 173 | /** | 175 | /** |
| 174 | * Updates the mouse wheel status of the mouse device | 176 | * Updates the mouse wheel status of the mouse device |
| 175 | * @param callback: A CallbackStatus containing the wheel status | 177 | * @param callback A CallbackStatus containing the wheel status |
| 176 | * @param index: wheel ID to be updated | 178 | * @param index wheel ID to be updated |
| 177 | */ | 179 | */ |
| 178 | void SetMouseAnalog(Common::Input::CallbackStatus callback, std::size_t index); | 180 | void SetMouseAnalog(Common::Input::CallbackStatus callback, std::size_t index); |
| 179 | 181 | ||
| 180 | /** | 182 | /** |
| 181 | * Updates the mouse position status of the mouse device | 183 | * Updates the mouse position status of the mouse device |
| 182 | * @param callback: A CallbackStatus containing the position status | 184 | * @param callback A CallbackStatus containing the position status |
| 183 | * @param index: stick ID to be updated | 185 | * @param index stick ID to be updated |
| 184 | */ | 186 | */ |
| 185 | void SetMouseStick(Common::Input::CallbackStatus callback); | 187 | void SetMouseStick(Common::Input::CallbackStatus callback); |
| 186 | 188 | ||
| 187 | /** | 189 | /** |
| 188 | * Triggers a callback that something has changed on the device status | 190 | * Triggers a callback that something has changed on the device status |
| 189 | * @param Input type of the event to trigger | 191 | * @param type Input type of the event to trigger |
| 190 | */ | 192 | */ |
| 191 | void TriggerOnChange(DeviceTriggerType type); | 193 | void TriggerOnChange(DeviceTriggerType type); |
| 192 | 194 | ||