@ -655,25 +655,27 @@ namespace AutoHotInterception
}
}
// Process Relative Mouse Move
if ( ( stroke . mouse . flags & ( ushort ) ManagedWrapper . MouseFlag . MouseMoveRelative ) = = ( ushort ) ManagedWrapper . MouseFlag . MouseMoveRelative )
if ( x ! = 0 | | y ! = 0 )
{
if ( x ! = 0 | | y ! = 0 )
hasMove = true ;
// Process Absolute Mouse Move
if ( ( stroke . mouse . flags & ( ushort ) ManagedWrapper . MouseFlag . MouseMoveAbsolute ) = = ( ushort ) ManagedWrapper . MouseFlag . MouseMoveAbsolute )
{
hasMove = true ;
if ( _mouseMoveRelativeMappings . ContainsKey ( i ) )
if ( _mouseMoveAbsoluteMappings . ContainsKey ( i ) )
{
var mapping = _mouseMove Relativ eMappings[ i ] ;
var mapping = _mouseMove Absolut eMappings[ i ] ;
hasSubscription = true ;
//var debugStr = $"AHK| Mouse stroke has rel ativ e move of {x}, {y}...";
//var debugStr = $"AHK| Mouse stroke has absolu te move of {x}, {y}...";
if ( mapping . Concurrent )
ThreadPool . QueueUserWorkItem ( threadProc = > mapping . Callback ( x , y ) ) ;
else if ( _workerThreads . ContainsKey ( i ) & & _workerThreads [ i ] . ContainsKey ( 8 ) )
_workerThreads [ i ] [ 8 ] ? . Actions . Add ( ( ) = > mapping . Callback ( x , y ) ) ;
else if ( _workerThreads . ContainsKey ( i ) & & _workerThreads [ i ] . ContainsKey ( 7 ) )
_workerThreads [ i ] [ 7 ] ? . Actions . Add ( ( ) = > mapping . Callback ( x , y ) ) ;
if ( mapping . Block )
{
moveRemoved = true ;
stroke . mouse . x = 0 ;
stroke . mouse . y = 0 ;
//debugStr += "Blocking";
}
else
@ -683,26 +685,26 @@ namespace AutoHotInterception
//Debug.WriteLine(debugStr);
}
}
}
// Process Absolute Mouse Move
else if ( ( stroke . mouse . flags & ( ushort ) ManagedWrapper . MouseFlag . MouseMoveAbsolute ) = = ( ushort ) ManagedWrapper . MouseFlag . MouseMoveAbsolute )
{
if ( x ! = 0 | | y ! = 0 )
// Process Relative Mouse Move
//else if ((stroke.mouse.flags & (ushort) ManagedWrapper.MouseFlag.MouseMoveRelative) == (ushort) ManagedWrapper.MouseFlag.MouseMoveRelative) / flag is 0, so always true!
else
{
hasMove = true ;
if ( _mouseMoveAbsoluteMappings . ContainsKey ( i ) )
if ( _mouseMoveRelativeMappings . ContainsKey ( i ) )
{
var mapping = _mouseMove Absolut eMappings[ i ] ;
var mapping = _mouseMove Relativ eMappings[ i ] ;
hasSubscription = true ;
//var debugStr = $"AHK| Mouse stroke has absolut e move of {x}, {y}...";
//var debugStr = $"AHK| Mouse stroke has relativ e move of {x}, {y}...";
if ( mapping . Concurrent )
ThreadPool . QueueUserWorkItem ( threadProc = > mapping . Callback ( x , y ) ) ;
else if ( _workerThreads . ContainsKey ( i ) & & _workerThreads [ i ] . ContainsKey ( 7 ) )
_workerThreads [ i ] [ 7 ] ? . Actions . Add ( ( ) = > mapping . Callback ( x , y ) ) ;
else if ( _workerThreads . ContainsKey ( i ) & & _workerThreads [ i ] . ContainsKey ( 8 ) )
_workerThreads [ i ] [ 8 ] ? . Actions . Add ( ( ) = > mapping . Callback ( x , y ) ) ;
if ( mapping . Block )
{
moveRemoved = true ;
stroke . mouse . x = 0 ;
stroke . mouse . y = 0 ;
//debugStr += "Blocking";
}
else
@ -712,6 +714,7 @@ namespace AutoHotInterception
//Debug.WriteLine(debugStr);
}
}
}
// Forward on the stroke if required