From 609cc3c1c3ca24c5a80d89b7c50edac214549f61 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Tue, 19 Jul 2016 19:55:44 -0400 Subject: [PATCH] SI_DeviceKeyboard: const correctness --- Source/Core/Core/HW/SI_DeviceKeyboard.cpp | 4 ++-- Source/Core/Core/HW/SI_DeviceKeyboard.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/Core/Core/HW/SI_DeviceKeyboard.cpp b/Source/Core/Core/HW/SI_DeviceKeyboard.cpp index adfd810b9b..63645be706 100644 --- a/Source/Core/Core/HW/SI_DeviceKeyboard.cpp +++ b/Source/Core/Core/HW/SI_DeviceKeyboard.cpp @@ -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; diff --git a/Source/Core/Core/HW/SI_DeviceKeyboard.h b/Source/Core/Core/HW/SI_DeviceKeyboard.h index 537fe6e47d..f04c098235 100644 --- a/Source/Core/Core/HW/SI_DeviceKeyboard.h +++ b/Source/Core/Core/HW/SI_DeviceKeyboard.h @@ -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;