summaryrefslogtreecommitdiff
path: root/src/core/hid/emulated_controller.h
diff options
context:
space:
mode:
authorGravatar german772021-10-30 12:12:52 -0500
committerGravatar Narr the Reg2021-11-24 20:30:26 -0600
commit5f69fdbfccdf68ddb5bb22de32321fa352b22c0a (patch)
tree30e760b02a4be5def57075563c5bb684067538ef /src/core/hid/emulated_controller.h
parentinput_common: Fix GC adapter initialization (diff)
downloadyuzu-5f69fdbfccdf68ddb5bb22de32321fa352b22c0a.tar.gz
yuzu-5f69fdbfccdf68ddb5bb22de32321fa352b22c0a.tar.xz
yuzu-5f69fdbfccdf68ddb5bb22de32321fa352b22c0a.zip
core/hid: Explain better what a temporary value does
Diffstat (limited to 'src/core/hid/emulated_controller.h')
-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:
149 149
150 /** 150 /**
151 * Gets the NpadType for this controller 151 * Gets the NpadType for this controller
152 * @param Returns the temporary value if true 152 * @param If true tmp_npad_type will be returned
153 * @return NpadType set on the controller 153 * @return NpadType set on the controller
154 */ 154 */
155 NpadType GetNpadType(bool temporary = false) const; 155 NpadType GetNpadType(bool get_temporary_value = false) const;
156 156
157 /// Sets the connected status to true 157 /// Sets the connected status to true
158 void Connect(); 158 void Connect();
@@ -162,10 +162,10 @@ public:
162 162
163 /** 163 /**
164 * Is the emulated connected 164 * Is the emulated connected
165 * @param Returns the temporary value if true 165 * @param If true tmp_is_connected will be returned
166 * @return true if the controller has the connected status 166 * @return true if the controller has the connected status
167 */ 167 */
168 bool IsConnected(bool temporary = false) const; 168 bool IsConnected(bool get_temporary_value = false) const;
169 169
170 /// Returns true if vibration is enabled 170 /// Returns true if vibration is enabled
171 bool IsVibrationEnabled() const; 171 bool IsVibrationEnabled() const;
@@ -346,12 +346,14 @@ private:
346 346
347 NpadIdType npad_id_type; 347 NpadIdType npad_id_type;
348 NpadType npad_type{NpadType::None}; 348 NpadType npad_type{NpadType::None};
349 NpadType temporary_npad_type{NpadType::None};
350 bool is_connected{false}; 349 bool is_connected{false};
351 bool temporary_is_connected{false};
352 bool is_configuring{false}; 350 bool is_configuring{false};
353 f32 motion_sensitivity{0.01f}; 351 f32 motion_sensitivity{0.01f};
354 352
353 // Temporary values to avoid doing changes while the controller is on configuration mode
354 NpadType tmp_npad_type{NpadType::None};
355 bool tmp_is_connected{false};
356
355 ButtonParams button_params; 357 ButtonParams button_params;
356 StickParams stick_params; 358 StickParams stick_params;
357 ControllerMotionParams motion_params; 359 ControllerMotionParams motion_params;