Merge pull request #4035 from lioncash/si-constness

SI_DeviceKeyboard: const correctness
This commit is contained in:
Matthew Parlane 2016-07-20 12:35:10 +12:00 committed by GitHub
commit 7b9e17b72d
2 changed files with 4 additions and 4 deletions

View File

@ -54,7 +54,7 @@ int CSIDevice_Keyboard::RunBuffer(u8* _pBuffer, int _iLength)
return _iLength;
}
KeyboardStatus CSIDevice_Keyboard::GetKeyboardStatus()
KeyboardStatus CSIDevice_Keyboard::GetKeyboardStatus() const
{
KeyboardStatus KeyStatus = {};
Keyboard::GetStatus(ISIDevice::m_iDeviceNumber, &KeyStatus);
@ -102,7 +102,7 @@ void CSIDevice_Keyboard::DoState(PointerWrap& p)
p.Do(m_Counter);
}
void CSIDevice_Keyboard::MapKeys(KeyboardStatus& KeyStatus, u8* key)
void CSIDevice_Keyboard::MapKeys(const KeyboardStatus& KeyStatus, u8* key)
{
u8 keys_held = 0;
const u8 MAX_KEYS_HELD = 3;

View File

@ -55,8 +55,8 @@ public:
// Return true on new data
bool GetData(u32& _Hi, u32& _Low) override;
KeyboardStatus GetKeyboardStatus();
void MapKeys(KeyboardStatus& KeyStatus, u8* key);
KeyboardStatus GetKeyboardStatus() const;
void MapKeys(const KeyboardStatus& KeyStatus, u8* key);
// Send a command directly
void SendCommand(u32 _Cmd, u8 _Poll) override;