diff --git a/Source/Core/Core/Core.vcxproj.filters b/Source/Core/Core/Core.vcxproj.filters index 6f1d44f1f626..d8213794ae70 100644 --- a/Source/Core/Core/Core.vcxproj.filters +++ b/Source/Core/Core/Core.vcxproj.filters @@ -409,12 +409,6 @@ HW %28Flipper/Hollywood%29\EXI - Expansion Interface - - HW %28Flipper/Hollywood%29\GCPad - - - HW %28Flipper/Hollywood%29\GCPad - HW %28Flipper/Hollywood%29\GCMemcard @@ -718,6 +712,14 @@ PowerPC\JitILCommon + + + + HW %28Flipper/Hollywood%29\GCKeyboard + + + HW %28Flipper/Hollywood%29\GCKeyboard + @@ -727,7 +729,6 @@ - @@ -937,12 +938,6 @@ HW %28Flipper/Hollywood%29\EXI - Expansion Interface - - HW %28Flipper/Hollywood%29\GCPad - - - HW %28Flipper/Hollywood%29\GCPad - HW %28Flipper/Hollywood%29\GCMemcard @@ -1222,8 +1217,16 @@ PowerPC\JitILCommon + + + + HW %28Flipper/Hollywood%29\GCKeyboard + + + HW %28Flipper/Hollywood%29\GCKeyboard + - + \ No newline at end of file diff --git a/Source/Core/Core/HW/GCKeyboardEmu.cpp b/Source/Core/Core/HW/GCKeyboardEmu.cpp index 8836aaeaa3f6..6efaf7e7280a 100644 --- a/Source/Core/Core/HW/GCKeyboardEmu.cpp +++ b/Source/Core/Core/HW/GCKeyboardEmu.cpp @@ -217,28 +217,28 @@ GCKeyboard::GCKeyboard(const unsigned int index) : m_index(index) { // buttons groups.emplace_back(m_keys0x = new Buttons(_trans("Keys"))); - for (unsigned int i = 0; i < sizeof(named_keys0) / sizeof(*named_keys0); ++i) - m_keys0x->controls.emplace_back(new ControlGroup::Input(named_keys0[i])); + for (const char* key : named_keys0) + m_keys0x->controls.emplace_back(new ControlGroup::Input(key)); groups.emplace_back(m_keys1x = new Buttons(_trans("Keys"))); - for (unsigned int i = 0; i < sizeof(named_keys1) / sizeof(*named_keys1); ++i) - m_keys1x->controls.emplace_back(new ControlGroup::Input(named_keys1[i])); + for (const char* key : named_keys1) + m_keys1x->controls.emplace_back(new ControlGroup::Input(key)); groups.emplace_back(m_keys2x = new Buttons(_trans("Keys"))); - for (unsigned int i = 0; i < sizeof(named_keys2) / sizeof(*named_keys2); ++i) - m_keys2x->controls.emplace_back(new ControlGroup::Input(named_keys2[i])); + for (const char* key : named_keys2) + m_keys2x->controls.emplace_back(new ControlGroup::Input(key)); groups.emplace_back(m_keys3x = new Buttons(_trans("Keys"))); - for (unsigned int i = 0; i < sizeof(named_keys3) / sizeof(*named_keys3); ++i) - m_keys3x->controls.emplace_back(new ControlGroup::Input(named_keys3[i])); + for (const char* key : named_keys3) + m_keys3x->controls.emplace_back(new ControlGroup::Input(key)); groups.emplace_back(m_keys4x = new Buttons(_trans("Keys"))); - for (unsigned int i = 0; i < sizeof(named_keys4) / sizeof(*named_keys4); ++i) - m_keys4x->controls.emplace_back(new ControlGroup::Input(named_keys4[i])); + for (const char* key : named_keys4) + m_keys4x->controls.emplace_back(new ControlGroup::Input(key)); groups.emplace_back(m_keys5x = new Buttons(_trans("Keys"))); - for (unsigned int i = 0; i < sizeof(named_keys5) / sizeof(*named_keys5); ++i) - m_keys5x->controls.emplace_back(new ControlGroup::Input(named_keys5[i])); + for (const char* key : named_keys5) + m_keys5x->controls.emplace_back(new ControlGroup::Input(key)); // options diff --git a/Source/Core/Core/HW/SI_DeviceKeyboard.cpp b/Source/Core/Core/HW/SI_DeviceKeyboard.cpp index bd1ba902ba00..a6abb3150891 100644 --- a/Source/Core/Core/HW/SI_DeviceKeyboard.cpp +++ b/Source/Core/Core/HW/SI_DeviceKeyboard.cpp @@ -51,8 +51,7 @@ int CSIDevice_Keyboard::RunBuffer(u8* _pBuffer, int _iLength) KeyboardStatus CSIDevice_Keyboard::GetKeyboardStatus() { - KeyboardStatus KeyStatus; - memset(&KeyStatus, 0, sizeof(KeyStatus)); + KeyboardStatus KeyStatus = {}; Keyboard::GetStatus(ISIDevice::m_iDeviceNumber, &KeyStatus); return KeyStatus; } diff --git a/Source/Core/Core/HW/SI_DeviceKeyboard.h b/Source/Core/Core/HW/SI_DeviceKeyboard.h index 923a5a860311..8155b80ec037 100644 --- a/Source/Core/Core/HW/SI_DeviceKeyboard.h +++ b/Source/Core/Core/HW/SI_DeviceKeyboard.h @@ -50,17 +50,17 @@ class CSIDevice_Keyboard : public ISIDevice CSIDevice_Keyboard(SIDevices device, int _iDeviceNumber); // Run the SI Buffer - virtual int RunBuffer(u8* _pBuffer, int _iLength) override; + int RunBuffer(u8* _pBuffer, int _iLength) override; // Return true on new data - virtual bool GetData(u32& _Hi, u32& _Low) override; + bool GetData(u32& _Hi, u32& _Low) override; - virtual KeyboardStatus GetKeyboardStatus(); - virtual void MapKeys(KeyboardStatus& KeyStatus, u8* key); + KeyboardStatus GetKeyboardStatus(); + void MapKeys(KeyboardStatus& KeyStatus, u8* key); // Send a command directly - virtual void SendCommand(u32 _Cmd, u8 _Poll) override; + void SendCommand(u32 _Cmd, u8 _Poll) override; // Savestate support - virtual void DoState(PointerWrap& p) override; + void DoState(PointerWrap& p) override; };