summaryrefslogtreecommitdiffstats
path: root/src/core/hid/emulated_controller.h
diff options
context:
space:
mode:
authorgerman77 <juangerman-13@hotmail.com>2021-12-05 02:37:03 +0100
committergerman77 <juangerman-13@hotmail.com>2021-12-05 06:20:18 +0100
commit7fe455e42ea1a8d5e702258212d54f21f1f31610 (patch)
tree0527ae35ff85e56adc4201d3e3204ec53bfeddb6 /src/core/hid/emulated_controller.h
parentMerge pull request #7467 from liushuyu/fix-linux-decoding (diff)
downloadyuzu-7fe455e42ea1a8d5e702258212d54f21f1f31610.tar
yuzu-7fe455e42ea1a8d5e702258212d54f21f1f31610.tar.gz
yuzu-7fe455e42ea1a8d5e702258212d54f21f1f31610.tar.bz2
yuzu-7fe455e42ea1a8d5e702258212d54f21f1f31610.tar.lz
yuzu-7fe455e42ea1a8d5e702258212d54f21f1f31610.tar.xz
yuzu-7fe455e42ea1a8d5e702258212d54f21f1f31610.tar.zst
yuzu-7fe455e42ea1a8d5e702258212d54f21f1f31610.zip
Diffstat (limited to 'src/core/hid/emulated_controller.h')
-rw-r--r--src/core/hid/emulated_controller.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/core/hid/emulated_controller.h b/src/core/hid/emulated_controller.h
index 5887e3e38..425b3e7c4 100644
--- a/src/core/hid/emulated_controller.h
+++ b/src/core/hid/emulated_controller.h
@@ -160,6 +160,13 @@ public:
*/
NpadStyleIndex GetNpadStyleIndex(bool get_temporary_value = false) const;
+ /**
+ * Sets the supported controller types. Disconnects the controller if current type is not
+ * supported
+ * @param supported_styles bitflag with supported types
+ */
+ void SetSupportedNpadStyleTag(NpadStyleTag supported_styles);
+
/// Sets the connected status to true
void Connect();
@@ -311,6 +318,12 @@ private:
void LoadTASParams();
/**
+ * Checks the current controller type against the supported_style_tag
+ * @return true if the controller is supported
+ */
+ bool IsControllerSupported() const;
+
+ /**
* Updates the button status of the controller
* @param callback A CallbackStatus containing the button status
* @param index Button ID of the to be updated
@@ -354,6 +367,7 @@ private:
NpadIdType npad_id_type;
NpadStyleIndex npad_type{NpadStyleIndex::None};
+ NpadStyleTag supported_style_tag{NpadStyleSet::All};
bool is_connected{false};
bool is_configuring{false};
f32 motion_sensitivity{0.01f};