Skip to content

Commit 35c0551

Browse files
committed
fix(SynthPointer): Fix issue with penFlags not being set correctly in HoverMove and ContactMove functions
The penFlags in the HoverMove and ContactMove functions were not being set correctly when the button was pressed. This resulted in incorrect behavior when using a pen device. The issue has been fixed by updating the assignment of penFlags to properly handle the button press condition.
1 parent 373a509 commit 35c0551

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

SynthPointer.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ void HoverMove(HSYNTHETICPOINTERDEVICE device, POINTER_TYPE_INFO *info, float x,
5151
info->penInfo.pointerInfo.ptPixelLocation.x = global.x;
5252
info->penInfo.pointerInfo.ptPixelLocation.y = global.y;
5353
info->penInfo.pointerInfo.pointerFlags = PEN_HOVER;
54-
info->penInfo.penFlags |= (buttonPressed) ? PEN_FLAG_BARREL : 0;
54+
info->penInfo.penFlags = (buttonPressed) ? PEN_FLAG_BARREL : PEN_FLAG_NONE;
5555

5656
_injectPointer(device, info);
5757
}
@@ -71,7 +71,7 @@ void ContactMove(HSYNTHETICPOINTERDEVICE device, POINTER_TYPE_INFO *info, float
7171
info->penInfo.pointerInfo.ptPixelLocation.x = global.x;
7272
info->penInfo.pointerInfo.ptPixelLocation.y = global.y;
7373
info->penInfo.pointerInfo.pointerFlags = PEN_CONTACT;
74-
info->penInfo.penFlags |= (buttonPressed) ? PEN_FLAG_BARREL : 0;
74+
info->penInfo.penFlags = (buttonPressed) ? PEN_FLAG_BARREL : PEN_FLAG_NONE;
7575
info->penInfo.penMask = PEN_MASK_PRESSURE;
7676
info->penInfo.pressure = pressure;
7777

0 commit comments

Comments
 (0)