mirror of
https://github.com/isledecomp/isle-portable.git
synced 2026-05-21 19:06:35 +00:00
Skip LMB hold threshold for immediate movement when RMB is held
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
c2901d1226
commit
7566d5c468
@ -9,8 +9,8 @@
|
|||||||
using namespace Extensions::ThirdPersonCamera;
|
using namespace Extensions::ThirdPersonCamera;
|
||||||
|
|
||||||
InputHandler::InputHandler()
|
InputHandler::InputHandler()
|
||||||
: m_touch{}, m_wantsAutoDisable(false), m_wantsAutoEnable(false), m_rightButtonHeld(false),
|
: m_touch{}, m_wantsAutoDisable(false), m_wantsAutoEnable(false), m_rightButtonHeld(false), m_leftButtonHeld(false),
|
||||||
m_leftButtonHeld(false), m_leftButtonDownTime(0), m_savedMouseX(0.0f), m_savedMouseY(0.0f)
|
m_leftButtonDownTime(0), m_savedMouseX(0.0f), m_savedMouseY(0.0f)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -79,7 +79,7 @@ bool InputHandler::ConsumeAutoEnable()
|
|||||||
bool InputHandler::IsLmbHeldForMovement() const
|
bool InputHandler::IsLmbHeldForMovement() const
|
||||||
{
|
{
|
||||||
return m_leftButtonHeld && m_leftButtonDownTime > 0 &&
|
return m_leftButtonHeld && m_leftButtonDownTime > 0 &&
|
||||||
(SDL_GetTicks() - m_leftButtonDownTime) >= LMB_HOLD_THRESHOLD_MS;
|
(m_rightButtonHeld || (SDL_GetTicks() - m_leftButtonDownTime) >= LMB_HOLD_THRESHOLD_MS);
|
||||||
}
|
}
|
||||||
|
|
||||||
void InputHandler::SuppressGestures()
|
void InputHandler::SuppressGestures()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user