Skip to content

Commit

Permalink
Fix mouse buttons not being considered held in SDL.
Browse files Browse the repository at this point in the history
Also, fix right mouse button state not being correctly
set when released.
  • Loading branch information
rohit-n committed May 8, 2024
1 parent bba0eb0 commit 0825563
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions SourceCode/CryInput/SDLMouse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ void CSDLMouse::Update(bool bPrevFocus)

memset(m_Deltas, 0, sizeof(m_Deltas));
memcpy(m_oldEvents, m_Events, sizeof(m_Events));
memset(m_Events, 0, sizeof(m_Events));

float mouseDelta[6];
memset(mouseDelta, 0, sizeof(mouseDelta));
Expand All @@ -105,7 +104,7 @@ void CSDLMouse::Update(bool bPrevFocus)
}
if (event.button.button == SDL_BUTTON_RIGHT)
{
m_Events[0] = 0;
m_Events[1] = 0;
}
}
else if (event.type == SDL_MOUSEWHEEL)
Expand Down

0 comments on commit 0825563

Please sign in to comment.