Fix the stuck state of the decelerate key that triggered once it was pressed.
This commit is contained in:
@@ -30,7 +30,7 @@ static float mouseScrollSpeed = 0.1;
|
||||
static bool isMouseMoving;
|
||||
static bool wasMouseMoving;
|
||||
|
||||
static bool activeMouseStates[SerializedMouseAction_Last];
|
||||
static bool activeMouseStates[ACTIVE_MOUSE_STATES_COUNT];
|
||||
|
||||
void processMouseActions()
|
||||
{
|
||||
@@ -178,7 +178,7 @@ static secondary_role_t secondaryRole;
|
||||
|
||||
void updateActiveUsbReports(void)
|
||||
{
|
||||
memset(activeMouseStates, 0, SerializedMouseAction_Last);
|
||||
memset(activeMouseStates, 0, ACTIVE_MOUSE_STATES_COUNT);
|
||||
wasMouseMoving = isMouseMoving;
|
||||
isMouseMoving = false;
|
||||
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
|
||||
// Macros:
|
||||
|
||||
#define ACTIVE_MOUSE_STATES_COUNT (SerializedMouseAction_Last + 1)
|
||||
|
||||
#define IS_SECONDARY_ROLE_MODIFIER(secondaryRole) (SecondaryRole_LeftCtrl <= (secondaryRole) && (secondaryRole) <= SecondaryRole_RightSuper)
|
||||
#define IS_SECONDARY_ROLE_LAYER_SWITCHER(secondaryRole) (SecondaryRole_Mod <= (secondaryRole) && (secondaryRole) <= SecondaryRole_Mouse)
|
||||
#define SECONDARY_ROLE_MODIFIER_TO_HID_MODIFIER(secondaryRoleModifier) (1 << ((secondaryRoleModifier) - 1))
|
||||
|
||||
Reference in New Issue
Block a user