Fixed shadow server mouse wheel mapping on MacOS
This commit is contained in:
parent
1dbd2d28d9
commit
6142da9cb8
@ -369,21 +369,22 @@ void mf_input_mouse_event(rdpInput* input, UINT16 flags, UINT16 x, UINT16 y)
|
||||
float width, height;
|
||||
|
||||
CGWheelCount wheelCount = 2;
|
||||
UINT32 scroll_x = 0;
|
||||
UINT32 scroll_y = 0;
|
||||
INT32 scroll_x = 0;
|
||||
INT32 scroll_y = 0;
|
||||
|
||||
if (flags & PTR_FLAGS_WHEEL)
|
||||
if (flags & (PTR_FLAGS_WHEEL | PTR_FLAGS_HWHEEL))
|
||||
{
|
||||
scroll_y = flags & WheelRotationMask;
|
||||
INT32 scroll = flags & WheelRotationMask;
|
||||
|
||||
if (flags & PTR_FLAGS_WHEEL_NEGATIVE)
|
||||
{
|
||||
scroll_y = -(flags & WheelRotationMask) / 392;
|
||||
}
|
||||
scroll = -(flags & WheelRotationMask) / 392;
|
||||
else
|
||||
{
|
||||
scroll_y = (flags & WheelRotationMask) / 120;
|
||||
}
|
||||
scroll = (flags & WheelRotationMask) / 120;
|
||||
|
||||
if (flags & PTR_FLAGS_WHEEL)
|
||||
scroll_y = scroll;
|
||||
else
|
||||
scroll_x = scroll;
|
||||
|
||||
CGEventSourceRef source = CGEventSourceCreate (kCGEventSourceStateHIDSystemState);
|
||||
CGEventRef scroll = CGEventCreateScrollWheelEvent(source,
|
||||
|
Loading…
Reference in New Issue
Block a user