File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed
Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -533,8 +533,12 @@ AmtPtpServiceTouchInputInterruptType5(
533533 // BOOL valid_finger = f->Finger != 6;
534534 PtpReport .Contacts [i ].Confidence = DeviceContext -> PalmRejection == FALSE ? TRUE : f -> Finger != 6 ; // valid_size && valid_finger;
535535
536+ #define UINT32_SET_MSB (v ) ((UINT32)v | ((UINT32)1 << 31))
537+
536538 PPTP_REPORT_AUX prev_contact = NULL ;
537539 if (
540+ DeviceContext -> PrevPtpReportAux1 .Id != UINT32_SET_MSB (f -> Id ) &&
541+ DeviceContext -> PrevPtpReportAux2 .Id != UINT32_SET_MSB (f -> Id ) &&
538542 (DeviceContext -> IgnoreButtonFinger == FALSE ? TRUE : (!DeviceContext -> PrevIsButtonClicked || !PtpReport .IsButtonClicked )) &&
539543 (DeviceContext -> StopPressure == 0xffffffff ? TRUE : f -> Pressure > DeviceContext -> StopPressure ) &&
540544 (DeviceContext -> StopSize == 0xffffffff ? TRUE : f -> Size > DeviceContext -> StopSize )
@@ -556,27 +560,34 @@ AmtPtpServiceTouchInputInterruptType5(
556560 contact -> Id = f -> Id ;
557561 contact -> TipSwitch = PtpReport .Contacts [i ].TipSwitch ;
558562 }
559- else
563+ else // lock the pointer:
560564 {
561565 size_t j ;
562566 for (j = 0 ; j < 2 ; j ++ )
563567 {
564568 PPTP_REPORT_AUX contact = !j ? & DeviceContext -> PrevPtpReportAux1 : & DeviceContext -> PrevPtpReportAux2 ;
565569
566- if (contact -> Id == f -> Id )
570+ if (contact -> Id == f -> Id || contact -> Id == UINT32_SET_MSB ( f -> Id ) )
567571 {
568572 contact -> TipSwitch = PtpReport .Contacts [i ].TipSwitch ;
569573
570574 if (contact -> TipSwitch )
575+ {
571576 prev_contact = contact ;
577+ contact -> Id = UINT32_SET_MSB (contact -> Id );
578+ }
572579 else
580+ {
573581 contact -> Id = (UINT32 )- 1 ;
582+ }
574583 }
575584 }
576585 }
577586 PtpReport .Contacts [i ].X = prev_contact ? prev_contact -> X : (USHORT )x ;
578587 PtpReport .Contacts [i ].Y = prev_contact ? prev_contact -> Y : (USHORT )y ;
579588
589+ #undef UINT32_SET_MSB
590+
580591//#ifdef INPUT_CONTENT_TRACE
581592 TraceEvents (
582593 TRACE_LEVEL_INFORMATION ,
You can’t perform that action at this time.
0 commit comments