summaryrefslogtreecommitdiffstats
path: root/src/core/hid/emulated_controller.h
diff options
context:
space:
mode:
authorgerman77 <juangerman-13@hotmail.com>2021-10-30 19:12:52 +0200
committerNarr the Reg <juangerman-13@hotmail.com>2021-11-25 03:30:26 +0100
commit5f69fdbfccdf68ddb5bb22de32321fa352b22c0a (patch)
tree30e760b02a4be5def57075563c5bb684067538ef /src/core/hid/emulated_controller.h
parentinput_common: Fix GC adapter initialization (diff)
downloadyuzu-5f69fdbfccdf68ddb5bb22de32321fa352b22c0a.tar
yuzu-5f69fdbfccdf68ddb5bb22de32321fa352b22c0a.tar.gz
yuzu-5f69fdbfccdf68ddb5bb22de32321fa352b22c0a.tar.bz2
yuzu-5f69fdbfccdf68ddb5bb22de32321fa352b22c0a.tar.lz
yuzu-5f69fdbfccdf68ddb5bb22de32321fa352b22c0a.tar.xz
yuzu-5f69fdbfccdf68ddb5bb22de32321fa352b22c0a.tar.zst
yuzu-5f69fdbfccdf68ddb5bb22de32321fa352b22c0a.zip
Diffstat (limited to '')
-rw-r--r--src/core/hid/emulated_controller.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/core/hid/emulated_controller.h b/src/core/hid/emulated_controller.h
index eec51e34a..fea401365 100644
--- a/src/core/hid/emulated_controller.h
+++ b/src/core/hid/emulated_controller.h
@@ -149,10 +149,10 @@ public:
/**
* Gets the NpadType for this controller
- * @param Returns the temporary value if true
+ * @param If true tmp_npad_type will be returned
* @return NpadType set on the controller
*/
- NpadType GetNpadType(bool temporary = false) const;
+ NpadType GetNpadType(bool get_temporary_value = false) const;
/// Sets the connected status to true
void Connect();
@@ -162,10 +162,10 @@ public:
/**
* Is the emulated connected
- * @param Returns the temporary value if true
+ * @param If true tmp_is_connected will be returned
* @return true if the controller has the connected status
*/
- bool IsConnected(bool temporary = false) const;
+ bool IsConnected(bool get_temporary_value = false) const;
/// Returns true if vibration is enabled
bool IsVibrationEnabled() const;
@@ -346,12 +346,14 @@ private:
NpadIdType npad_id_type;
NpadType npad_type{NpadType::None};
- NpadType temporary_npad_type{NpadType::None};
bool is_connected{false};
- bool temporary_is_connected{false};
bool is_configuring{false};
f32 motion_sensitivity{0.01f};
+ // Temporary values to avoid doing changes while the controller is on configuration mode
+ NpadType tmp_npad_type{NpadType::None};
+ bool tmp_is_connected{false};
+
ButtonParams button_params;
StickParams stick_params;
ControllerMotionParams motion_params;