From 5f69fdbfccdf68ddb5bb22de32321fa352b22c0a Mon Sep 17 00:00:00 2001 From: german77 Date: Sat, 30 Oct 2021 12:12:52 -0500 Subject: core/hid: Explain better what a temporary value does --- src/core/hid/emulated_controller.h | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src/core/hid/emulated_controller.h') 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; -- cgit v1.2.3