summaryrefslogtreecommitdiff
path: root/src/core/hid/emulated_controller.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hid/emulated_controller.h')
-rw-r--r--src/core/hid/emulated_controller.h20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/core/hid/emulated_controller.h b/src/core/hid/emulated_controller.h
index c0994ab4d..a63a83cce 100644
--- a/src/core/hid/emulated_controller.h
+++ b/src/core/hid/emulated_controller.h
@@ -101,6 +101,8 @@ struct ControllerStatus {
101 VibrationValues vibration_values{}; 101 VibrationValues vibration_values{};
102 102
103 // Data for HID serices 103 // Data for HID serices
104 HomeButtonState home_button_state{};
105 CaptureButtonState capture_button_state{};
104 NpadButtonState npad_button_state{}; 106 NpadButtonState npad_button_state{};
105 DebugPadButton debug_pad_button_state{}; 107 DebugPadButton debug_pad_button_state{};
106 AnalogSticks analog_stick_state{}; 108 AnalogSticks analog_stick_state{};
@@ -198,6 +200,15 @@ public:
198 /// Returns the emulated controller into normal mode, allowing the modification of the HID state 200 /// Returns the emulated controller into normal mode, allowing the modification of the HID state
199 void DisableConfiguration(); 201 void DisableConfiguration();
200 202
203 /// Enables Home and Screenshot buttons
204 void EnableSystemButtons();
205
206 /// Disables Home and Screenshot buttons
207 void DisableSystemButtons();
208
209 /// Sets Home and Screenshot buttons to false
210 void ResetSystemButtons();
211
201 /// Returns true if the emulated controller is in configuring mode 212 /// Returns true if the emulated controller is in configuring mode
202 bool IsConfiguring() const; 213 bool IsConfiguring() const;
203 214
@@ -261,7 +272,13 @@ public:
261 /// Returns the latest battery status from the controller with parameters 272 /// Returns the latest battery status from the controller with parameters
262 BatteryValues GetBatteryValues() const; 273 BatteryValues GetBatteryValues() const;
263 274
264 /// Returns the latest status of button input for the npad service 275 /// Returns the latest status of button input for the hid::HomeButton service
276 HomeButtonState GetHomeButtons() const;
277
278 /// Returns the latest status of button input for the hid::CaptureButton service
279 CaptureButtonState GetCaptureButtons() const;
280
281 /// Returns the latest status of button input for the hid::Npad service
265 NpadButtonState GetNpadButtons() const; 282 NpadButtonState GetNpadButtons() const;
266 283
267 /// Returns the latest status of button input for the debug pad service 284 /// Returns the latest status of button input for the debug pad service
@@ -383,6 +400,7 @@ private:
383 NpadStyleTag supported_style_tag{NpadStyleSet::All}; 400 NpadStyleTag supported_style_tag{NpadStyleSet::All};
384 bool is_connected{false}; 401 bool is_connected{false};
385 bool is_configuring{false}; 402 bool is_configuring{false};
403 bool system_buttons_enabled{true};
386 f32 motion_sensitivity{0.01f}; 404 f32 motion_sensitivity{0.01f};
387 bool force_update_motion{false}; 405 bool force_update_motion{false};
388 406