Patch Update - V9.2.3
[FIX] : ~ Use The Already Implemented IsKeyDown avoid calling each tick the method bound to the input
This commit is contained in:
@@ -268,16 +268,16 @@ bool SystemClass::Frame()
|
||||
return false;
|
||||
}
|
||||
|
||||
if(m_Input->IsTildePressed() && !m_IsDebugKeyPressed)
|
||||
if(!m_Input->IsKeyDown(222))
|
||||
{
|
||||
//log the key press
|
||||
m_IsDebugKeyPressed = true;
|
||||
DEBUG_MODE = !DEBUG_MODE;
|
||||
m_IsDebugKeyPressed = false;
|
||||
}
|
||||
else if (!m_Input->IsTildeReleased())
|
||||
else if (m_Input->IsKeyDown(222) && !m_IsDebugKeyPressed)
|
||||
{
|
||||
// Log the key release state
|
||||
m_IsDebugKeyPressed = false;
|
||||
m_IsDebugKeyPressed = true;
|
||||
DEBUG_MODE = !DEBUG_MODE;
|
||||
}
|
||||
|
||||
|
||||
|
@@ -121,7 +121,7 @@ bool InputClass::Initialize(HINSTANCE hinstance, HWND hwnd, int screenWidth, int
|
||||
void InputClass::KeyDown(unsigned int input)
|
||||
{
|
||||
// If a key is pressed then save that state in the key array.
|
||||
Logger::Get().Log("Key down", __FILE__, __LINE__, Logger::LogLevel::Input);
|
||||
Logger::Get().Log("Key down: " + std::to_string(input), __FILE__, __LINE__, Logger::LogLevel::Input);
|
||||
m_keys[input] = true;
|
||||
return;
|
||||
}
|
||||
@@ -130,7 +130,6 @@ void InputClass::KeyDown(unsigned int input)
|
||||
void InputClass::KeyUp(unsigned int input)
|
||||
{
|
||||
// If a key is released then clear that state in the key array.
|
||||
Logger::Get().Log("Key up", __FILE__, __LINE__, Logger::LogLevel::Input);
|
||||
m_keys[input] = false;
|
||||
return;
|
||||
}
|
||||
@@ -385,17 +384,6 @@ bool InputClass::IsEPressed() const
|
||||
return false;
|
||||
}
|
||||
|
||||
bool InputClass::IsTildePressed() const
|
||||
{
|
||||
return (m_keyboardState[DIK_GRAVE] & 0x80) && !m_previousTildeState;
|
||||
}
|
||||
|
||||
// Ajoutez la m<>thode IsTildeReleased pour v<>rifier si la touche est actuellement rel<65>ch<63>e et <20>tait enfonc<6E>e lors de la derni<6E>re v<>rification
|
||||
bool InputClass::IsTildeReleased() const
|
||||
{
|
||||
return !(m_keyboardState[DIK_GRAVE] & 0x80) && m_previousTildeState;
|
||||
}
|
||||
|
||||
void InputClass::GetMouseLocation(int& mouseX, int& mouseY) const
|
||||
{
|
||||
mouseX = m_mouseX;
|
||||
|
Reference in New Issue
Block a user