minor log - update

This commit is contained in:
2025-01-18 15:56:25 +01:00
parent cb3f10b7d5
commit a88ed06198
7 changed files with 145 additions and 115 deletions

View File

@@ -222,8 +222,11 @@ bool SystemClass::Frame()
LRESULT CALLBACK SystemClass::MessageHandler(HWND hwnd, UINT umsg, WPARAM wparam, LPARAM lparam)
{
Logger::Get().Log("Message received: " + std::to_string(umsg), __FILE__, __LINE__, Logger::LogLevel::Input);
if (ImGui_ImplWin32_WndProcHandler(hwnd, umsg, wparam, lparam))
{
Logger::Get().Log("ImGui_ImplWin32_WndProcHandler handled the message", __FILE__, __LINE__, Logger::LogLevel::Input);
return true;
}
@@ -232,6 +235,7 @@ LRESULT CALLBACK SystemClass::MessageHandler(HWND hwnd, UINT umsg, WPARAM wparam
// Check if a key has been pressed on the keyboard.
case WM_KEYDOWN:
{
Logger::Get().Log("WM_KEYDOWN received: " + std::to_string(wparam), __FILE__, __LINE__, Logger::LogLevel::Input);
// If a key is pressed send it to the input object so it can record that state.
m_Input->KeyDown((unsigned int)wparam);
return 0;
@@ -240,6 +244,7 @@ LRESULT CALLBACK SystemClass::MessageHandler(HWND hwnd, UINT umsg, WPARAM wparam
// Check if a key has been released on the keyboard.
case WM_KEYUP:
{
Logger::Get().Log("WM_KEYUP received: " + std::to_string(wparam), __FILE__, __LINE__,Logger::LogLevel::Input);
// If a key is released then send it to the input object so it can unset the state for that key.
m_Input->KeyUp((unsigned int)wparam);
return 0;