Revert "Fix close inputs being throttled, and speed up scrolling when a key is held (#3515)"
This reverts commit 614d4ac2f7
.
This commit is contained in:
parent
5918a6025e
commit
a05fa23bf3
@ -82,7 +82,6 @@ InputManager::InputManager() : m_mode(BOOTSTRAP),
|
||||
m_timer_in_use = false;
|
||||
m_master_player_only = false;
|
||||
m_timer = 0;
|
||||
m_timer_use_count = 0;
|
||||
|
||||
}
|
||||
// -----------------------------------------------------------------------------
|
||||
@ -824,6 +823,12 @@ void InputManager::dispatchInput(Input::InputType type, int deviceID,
|
||||
// ... when in menus
|
||||
else
|
||||
{
|
||||
// reset timer when released
|
||||
if (abs(value) == 0 && type == Input::IT_STICKBUTTON)
|
||||
{
|
||||
m_timer_in_use = false;
|
||||
m_timer = 0;
|
||||
}
|
||||
|
||||
// When in master-only mode, we can safely assume that players
|
||||
// are set up, contrarly to early menus where we accept every
|
||||
@ -855,10 +860,7 @@ void InputManager::dispatchInput(Input::InputType type, int deviceID,
|
||||
if (abs(value) > Input::MAX_VALUE*2/3)
|
||||
{
|
||||
m_timer_in_use = true;
|
||||
|
||||
// After three iterations of the timer, pick up the scrolling pace
|
||||
m_timer_use_count++;
|
||||
m_timer = m_timer_use_count > 3 ? 0.05 : 0.25;
|
||||
m_timer = 0.25;
|
||||
}
|
||||
|
||||
// player may be NULL in early menus, before player setup has
|
||||
@ -885,14 +887,6 @@ void InputManager::dispatchInput(Input::InputType type, int deviceID,
|
||||
->processGUIAction(action, deviceID, abs(value), type,
|
||||
playerID);
|
||||
}
|
||||
|
||||
// reset timer when released
|
||||
if (abs(value) == 0)
|
||||
{
|
||||
m_timer_in_use = false;
|
||||
m_timer = 0;
|
||||
m_timer_use_count = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (type == Input::IT_KEYBOARD)
|
||||
|
@ -46,6 +46,9 @@ public:
|
||||
BOOTSTRAP
|
||||
};
|
||||
|
||||
// to put a delay before a new gamepad axis move is considered in menu
|
||||
bool m_timer_in_use;
|
||||
float m_timer;
|
||||
|
||||
private:
|
||||
|
||||
@ -65,11 +68,6 @@ private:
|
||||
*/
|
||||
int m_mouse_val_x, m_mouse_val_y;
|
||||
|
||||
// to put a delay before a new gamepad axis move is considered in menu
|
||||
bool m_timer_in_use;
|
||||
int m_timer_use_count;
|
||||
float m_timer;
|
||||
|
||||
void dispatchInput(Input::InputType, int deviceID, int btnID,
|
||||
Input::AxisDirection direction, int value,
|
||||
bool shift_mask = false);
|
||||
|
Loading…
Reference in New Issue
Block a user