Skip to content
Permalink
Browse files

IOS/USB_KBD: Rename SMessageData to MessageData

We don't need to prefix this with S to signify that it's a struct.
  • Loading branch information...
lioncash committed May 31, 2019
1 parent cc54652 commit e0552e0642fa8b2efd05de402f65263ff61eba4a
Showing with 5 additions and 5 deletions.
  1. +2 −2 Source/Core/Core/IOS/USB/USB_KBD.cpp
  2. +3 −3 Source/Core/Core/IOS/USB/USB_KBD.h
@@ -176,7 +176,7 @@ constexpr std::array<u8, 256> s_key_codes_azerty{};
#endif
} // Anonymous namespace

USB_KBD::SMessageData::SMessageData(u32 type, u8 modifiers, PressedKeyData pressed_keys)
USB_KBD::MessageData::MessageData(u32 type, u8 modifiers, PressedKeyData pressed_keys)
: MsgType{Common::swap32(type)}, Modifiers{modifiers}, PressedKeys{pressed_keys}
{
}
@@ -213,7 +213,7 @@ IPCCommandResult USB_KBD::IOCtl(const IOCtlRequest& request)
if (SConfig::GetInstance().m_WiiKeyboard && !Core::WantsDeterminism() &&
ControlReference::InputGateOn() && !m_MessageQueue.empty())
{
Memory::CopyToEmu(request.buffer_out, &m_MessageQueue.front(), sizeof(SMessageData));
Memory::CopyToEmu(request.buffer_out, &m_MessageQueue.front(), sizeof(MessageData));
m_MessageQueue.pop();
}
return GetDefaultReply(IPC_SUCCESS);
@@ -35,18 +35,18 @@ class USB_KBD : public Device
using PressedKeyData = std::array<u8, 6>;

#pragma pack(push, 1)
struct SMessageData
struct MessageData
{
u32 MsgType = 0;
u32 Unk1 = 0;
u8 Modifiers = 0;
u8 Unk2 = 0;
PressedKeyData PressedKeys{};

SMessageData(u32 msg_type, u8 modifiers, PressedKeyData pressed_keys);
MessageData(u32 msg_type, u8 modifiers, PressedKeyData pressed_keys);
};
#pragma pack(pop)
std::queue<SMessageData> m_MessageQueue;
std::queue<MessageData> m_MessageQueue;

std::array<bool, 256> m_OldKeyBuffer{};
u8 m_OldModifiers = 0;

0 comments on commit e0552e0

Please sign in to comment.
You can’t perform that action at this time.