diff --git a/rpcs3/Emu/Io/Keyboard.h b/rpcs3/Emu/Io/Keyboard.h index 1cd6201def..310c1fb33a 100644 --- a/rpcs3/Emu/Io/Keyboard.h +++ b/rpcs3/Emu/Io/Keyboard.h @@ -1,5 +1,6 @@ #pragma once +#include #include "KeyboardHandler.h" class KeyboardManager //: public wxWindow @@ -14,9 +15,9 @@ public: void Init(const u32 max_connect); void Close(); - Array& GetKeyboards() { return m_keyboard_handler->GetKeyboards(); } + std::vector& GetKeyboards() { return m_keyboard_handler->GetKeyboards(); } KbInfo& GetInfo() { return m_keyboard_handler->GetInfo(); } - Array& GetButtons(const u32 keyboard) { return m_keyboard_handler->GetButtons(keyboard); } + std::vector& GetButtons(const u32 keyboard) { return m_keyboard_handler->GetButtons(keyboard); } CellKbData& GetData(const u32 keyboard) { return m_keyboard_handler->GetData(keyboard); } CellKbConfig& GetConfig(const u32 keyboard) { return m_keyboard_handler->GetConfig(keyboard); } diff --git a/rpcs3/Emu/Io/KeyboardHandler.h b/rpcs3/Emu/Io/KeyboardHandler.h index 463ae9516a..d10828bb8e 100644 --- a/rpcs3/Emu/Io/KeyboardHandler.h +++ b/rpcs3/Emu/Io/KeyboardHandler.h @@ -1,5 +1,7 @@ #pragma once +#include + extern u16 cellKbCnvRawCode(u32 arrange, u32 mkey, u32 led, u16 rawcode); // (TODO: Can it be problematic to place SysCalls in middle of nowhere?) enum KbPortStatus @@ -248,7 +250,7 @@ struct Keyboard { CellKbData m_data; CellKbConfig m_config; - Array m_buttons; + std::vector m_buttons; Keyboard() : m_data() @@ -256,14 +258,16 @@ struct Keyboard { } - ~Keyboard() { m_buttons.Clear(); } + ~Keyboard() + { + } }; class KeyboardHandlerBase { protected: KbInfo m_info; - Array m_keyboards; + std::vector m_keyboards; public: virtual void Init(const u32 max_connect)=0; @@ -271,21 +275,21 @@ public: void Key(const u32 code, bool pressed) { - for(u64 p=0; p& GetKeyboards() { return m_keyboards; } - Array& GetButtons(const u32 keyboard) { return GetKeyboards()[keyboard].m_buttons; } - CellKbData& GetData(const u32 keyboard) { return GetKeyboards()[keyboard].m_data; } - CellKbConfig& GetConfig(const u32 keyboard) { return GetKeyboards()[keyboard].m_config; } + std::vector& GetKeyboards() { return m_keyboards; } + std::vector& GetButtons(const u32 keyboard) { return m_keyboards[keyboard].m_buttons; } + CellKbData& GetData(const u32 keyboard) { return m_keyboards[keyboard].m_data; } + CellKbConfig& GetConfig(const u32 keyboard) { return m_keyboards[keyboard].m_config; } }; \ No newline at end of file diff --git a/rpcs3/Emu/Io/Mouse.h b/rpcs3/Emu/Io/Mouse.h index 6b2e47611a..39572d2c0a 100644 --- a/rpcs3/Emu/Io/Mouse.h +++ b/rpcs3/Emu/Io/Mouse.h @@ -1,5 +1,6 @@ #pragma once +#include #include "MouseHandler.h" class MouseManager //: public wxWindow @@ -14,7 +15,7 @@ public: void Init(const u32 max_connect); void Close(); - Array& GetMice() { return m_mouse_handler->GetMice(); } + std::vector& GetMice() { return m_mouse_handler->GetMice(); } MouseInfo& GetInfo() { return m_mouse_handler->GetInfo(); } CellMouseData& GetData(const u32 mouse) { return m_mouse_handler->GetData(mouse); } CellMouseRawData& GetRawData(const u32 mouse) { return m_mouse_handler->GetRawData(mouse); } diff --git a/rpcs3/Emu/Io/MouseHandler.h b/rpcs3/Emu/Io/MouseHandler.h index 00cbab73e4..c081ae2f7e 100644 --- a/rpcs3/Emu/Io/MouseHandler.h +++ b/rpcs3/Emu/Io/MouseHandler.h @@ -1,5 +1,7 @@ #pragma once +#include + enum MousePortStatus { CELL_MOUSE_STATUS_DISCONNECTED = 0x00000000, @@ -99,7 +101,7 @@ class MouseHandlerBase { protected: MouseInfo m_info; - Array m_mice; + std::vector m_mice; public: virtual void Init(const u32 max_connect)=0; @@ -107,7 +109,7 @@ public: void Button(u8 button, bool pressed) { - for(u64 p=0; p& GetMice() { return m_mice; } - CellMouseData& GetData(const u32 mouse) { return GetMice()[mouse].m_data; } - CellMouseRawData& GetRawData(const u32 mouse) { return GetMice()[mouse].m_rawdata; } + std::vector& GetMice() { return m_mice; } + CellMouseData& GetData(const u32 mouse) { return m_mice[mouse].m_data; } + CellMouseRawData& GetRawData(const u32 mouse) { return m_mice[mouse].m_rawdata; } }; \ No newline at end of file diff --git a/rpcs3/Emu/Io/Null/NullKeyboardHandler.h b/rpcs3/Emu/Io/Null/NullKeyboardHandler.h index 4846487e1d..78d25be2b3 100644 --- a/rpcs3/Emu/Io/Null/NullKeyboardHandler.h +++ b/rpcs3/Emu/Io/Null/NullKeyboardHandler.h @@ -13,16 +13,16 @@ public: { memset(&m_info, 0, sizeof(KbInfo)); m_info.max_connect = max_connect; - m_keyboards.Clear(); + m_keyboards.clear(); for(u32 i=0; i #include "PadHandler.h" class PadManager //: public wxWindow @@ -14,9 +15,9 @@ public: void Init(const u32 max_connect); void Close(); - Array& GetPads() { return m_pad_handler->GetPads(); } + std::vector& GetPads() { return m_pad_handler->GetPads(); } PadInfo& GetInfo() { return m_pad_handler->GetInfo(); } - Array