summaryrefslogtreecommitdiffstats
path: root/src/core/hid/emulated_controller.h
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2022-01-11 19:49:23 +0100
committerGitHub <noreply@github.com>2022-01-11 19:49:23 +0100
commitc65c651b6fb174084a26039ce6ea78e9cd3aedf0 (patch)
tree9790b6abe3e9d05649629fe851031438ed6ad139 /src/core/hid/emulated_controller.h
parentMerge pull request #7683 from liushuyu/fmt-8.1 (diff)
parentyuzu: Add controller hotkeys (diff)
downloadyuzu-c65c651b6fb174084a26039ce6ea78e9cd3aedf0.tar
yuzu-c65c651b6fb174084a26039ce6ea78e9cd3aedf0.tar.gz
yuzu-c65c651b6fb174084a26039ce6ea78e9cd3aedf0.tar.bz2
yuzu-c65c651b6fb174084a26039ce6ea78e9cd3aedf0.tar.lz
yuzu-c65c651b6fb174084a26039ce6ea78e9cd3aedf0.tar.xz
yuzu-c65c651b6fb174084a26039ce6ea78e9cd3aedf0.tar.zst
yuzu-c65c651b6fb174084a26039ce6ea78e9cd3aedf0.zip
Diffstat (limited to '')
-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 {
VibrationValues vibration_values{};
// Data for HID serices
+ HomeButtonState home_button_state{};
+ CaptureButtonState capture_button_state{};
NpadButtonState npad_button_state{};
DebugPadButton debug_pad_button_state{};
AnalogSticks analog_stick_state{};
@@ -198,6 +200,15 @@ public:
/// Returns the emulated controller into normal mode, allowing the modification of the HID state
void DisableConfiguration();
+ /// Enables Home and Screenshot buttons
+ void EnableSystemButtons();
+
+ /// Disables Home and Screenshot buttons
+ void DisableSystemButtons();
+
+ /// Sets Home and Screenshot buttons to false
+ void ResetSystemButtons();
+
/// Returns true if the emulated controller is in configuring mode
bool IsConfiguring() const;
@@ -261,7 +272,13 @@ public:
/// Returns the latest battery status from the controller with parameters
BatteryValues GetBatteryValues() const;
- /// Returns the latest status of button input for the npad service
+ /// Returns the latest status of button input for the hid::HomeButton service
+ HomeButtonState GetHomeButtons() const;
+
+ /// Returns the latest status of button input for the hid::CaptureButton service
+ CaptureButtonState GetCaptureButtons() const;
+
+ /// Returns the latest status of button input for the hid::Npad service
NpadButtonState GetNpadButtons() const;
/// Returns the latest status of button input for the debug pad service
@@ -383,6 +400,7 @@ private:
NpadStyleTag supported_style_tag{NpadStyleSet::All};
bool is_connected{false};
bool is_configuring{false};
+ bool system_buttons_enabled{true};
f32 motion_sensitivity{0.01f};
bool force_update_motion{false};