diff --git a/rpcs3/Emu/Io/GunCon3.h b/rpcs3/Emu/Io/GunCon3.h index dd82c1442e..2cdbb27e20 100644 --- a/rpcs3/Emu/Io/GunCon3.h +++ b/rpcs3/Emu/Io/GunCon3.h @@ -3,7 +3,6 @@ #include "Emu/Io/usb_device.h" #include #include -#include class usb_device_guncon3 : public usb_device_emulated { diff --git a/rpcs3/Emu/Io/WiimoteManager.h b/rpcs3/Emu/Io/WiimoteManager.h index d12ee28f0f..4d6151fc47 100644 --- a/rpcs3/Emu/Io/WiimoteManager.h +++ b/rpcs3/Emu/Io/WiimoteManager.h @@ -10,6 +10,7 @@ #include #include #include +#include struct wiimote_ir_point { @@ -54,8 +55,10 @@ struct wiimote_guncon_mapping struct wiimote_state { u16 buttons = 0; - s16 acc_x = 0, acc_y = 0, acc_z = 0; - wiimote_ir_point ir[4]; + s16 acc_x = 0; + s16 acc_y = 0; + s16 acc_z = 0; + std::array ir {}; bool connected = false; }; @@ -70,14 +73,14 @@ public: bool update(); const wiimote_state& get_state() const { return m_state; } - std::string get_path() const { return m_path; } - std::wstring get_serial() const { return m_serial; } + const std::string& get_path() const { return m_path; } + const std::wstring& get_serial() const { return m_serial; } private: hid_device* m_handle = nullptr; std::string m_path; std::wstring m_serial; - wiimote_state m_state; + wiimote_state m_state {}; std::chrono::steady_clock::time_point m_last_ir_check; bool initialize_ir(); @@ -107,7 +110,7 @@ private: atomic_t m_running{false}; std::vector> m_devices; shared_mutex m_mutex; - wiimote_guncon_mapping m_mapping; + wiimote_guncon_mapping m_mapping {}; void thread_proc(); void load_config();