diff --git a/rpcs3/Emu/Io/PadHandler.h b/rpcs3/Emu/Io/PadHandler.h index b392c18b11..30f4c8d46f 100644 --- a/rpcs3/Emu/Io/PadHandler.h +++ b/rpcs3/Emu/Io/PadHandler.h @@ -177,6 +177,7 @@ public: u32 connected_devices = 0; pad_handler m_type; + bool m_is_init = false; std::string name_string() const; usz max_devices() const; diff --git a/rpcs3/Input/evdev_joystick_handler.h b/rpcs3/Input/evdev_joystick_handler.h index 8bfed437f6..822920822f 100644 --- a/rpcs3/Input/evdev_joystick_handler.h +++ b/rpcs3/Input/evdev_joystick_handler.h @@ -408,7 +408,6 @@ private: std::shared_ptr m_dev; bool m_is_button_or_trigger; bool m_is_negative; - bool m_is_init = false; bool check_button(const EvdevButton& b, const u32 code); bool check_buttons(const std::array& b, const u32 code); diff --git a/rpcs3/Input/hid_pad_handler.h b/rpcs3/Input/hid_pad_handler.h index 005239a046..1259b530d5 100644 --- a/rpcs3/Input/hid_pad_handler.h +++ b/rpcs3/Input/hid_pad_handler.h @@ -76,7 +76,6 @@ protected: // pseudo 'controller id' to keep track of unique controllers std::map> m_controllers; - bool m_is_init = false; std::set m_last_enumerated_devices; std::set m_new_enumerated_devices; std::map m_enumerated_serials; diff --git a/rpcs3/Input/mm_joystick_handler.cpp b/rpcs3/Input/mm_joystick_handler.cpp index 7daed17d82..88078f44e5 100644 --- a/rpcs3/Input/mm_joystick_handler.cpp +++ b/rpcs3/Input/mm_joystick_handler.cpp @@ -70,7 +70,7 @@ void mm_joystick_handler::init_config(cfg_pad* cfg) bool mm_joystick_handler::Init() { - if (is_init) + if (m_is_init) return true; m_devices.clear(); @@ -94,7 +94,7 @@ bool mm_joystick_handler::Init() m_devices.emplace(i, dev); } - is_init = true; + m_is_init = true; return true; } diff --git a/rpcs3/Input/mm_joystick_handler.h b/rpcs3/Input/mm_joystick_handler.h index 1a70361c4c..803f45e79b 100644 --- a/rpcs3/Input/mm_joystick_handler.h +++ b/rpcs3/Input/mm_joystick_handler.h @@ -121,7 +121,7 @@ private: int GetIDByName(const std::string& name); bool GetMMJOYDevice(int index, MMJOYDevice* dev) const; - bool is_init = false; + bool m_is_init = false; std::vector m_blacklist; std::unordered_map m_devices; diff --git a/rpcs3/Input/xinput_pad_handler.cpp b/rpcs3/Input/xinput_pad_handler.cpp index 0a6fdbccb4..a6d23a25ad 100644 --- a/rpcs3/Input/xinput_pad_handler.cpp +++ b/rpcs3/Input/xinput_pad_handler.cpp @@ -338,7 +338,7 @@ pad_preview_values xinput_pad_handler::get_preview_values(const std::unordered_m bool xinput_pad_handler::Init() { - if (is_init) + if (m_is_init) return true; for (auto it : XINPUT_INFO::LIBRARY_FILENAMES) @@ -357,7 +357,7 @@ bool xinput_pad_handler::Init() if (xinputGetState && xinputSetState && xinputGetBatteryInformation) { - is_init = true; + m_is_init = true; break; } @@ -371,7 +371,7 @@ bool xinput_pad_handler::Init() } } - if (!is_init) + if (!m_is_init) return false; return true; diff --git a/rpcs3/Input/xinput_pad_handler.h b/rpcs3/Input/xinput_pad_handler.h index 90ade32fda..49595f7696 100644 --- a/rpcs3/Input/xinput_pad_handler.h +++ b/rpcs3/Input/xinput_pad_handler.h @@ -119,12 +119,10 @@ private: typedef DWORD (WINAPI * PFN_XINPUTSETSTATE)(DWORD, XINPUT_VIBRATION *); typedef DWORD (WINAPI * PFN_XINPUTGETBATTERYINFORMATION)(DWORD, BYTE, XINPUT_BATTERY_INFORMATION *); -private: int GetDeviceNumber(const std::string& padId); static PadButtonValues get_button_values_base(const XINPUT_STATE& state); static PadButtonValues get_button_values_scp(const SCP_EXTN& state); - bool is_init{ false }; HMODULE library{ nullptr }; PFN_XINPUTGETEXTENDED xinputGetExtended{ nullptr }; PFN_XINPUTGETCUSTOMDATA xinputGetCustomData{ nullptr };