|
@@ -1202,6 +1202,7 @@ void la_SaveEvent(SYSWINDOW hwnd, laEvent *e, int use_last_pos){
|
|
la_MakeSpecialKeyBit(hwnd,wnd,e,use_last_pos);
|
|
la_MakeSpecialKeyBit(hwnd,wnd,e,use_last_pos);
|
|
if(use_last_pos){ e->x=MAIN.evLastX; e->y=MAIN.evLastY; }
|
|
if(use_last_pos){ e->x=MAIN.evLastX; e->y=MAIN.evLastY; }
|
|
|
|
|
|
|
|
+ e->Twist=MAIN.StylusTwist;
|
|
e->Pressure=MAIN.IsPen?(MAIN.PointerIsEraser?MAIN.EraserPressure:MAIN.StylusPressure):0.5f;
|
|
e->Pressure=MAIN.IsPen?(MAIN.PointerIsEraser?MAIN.EraserPressure:MAIN.StylusPressure):0.5f;
|
|
e->Orientation=MAIN.PointerIsEraser?MAIN.EraserOrientation:MAIN.StylusOrientation;
|
|
e->Orientation=MAIN.PointerIsEraser?MAIN.EraserOrientation:MAIN.StylusOrientation;
|
|
e->Deviation=MAIN.PointerIsEraser?MAIN.EraserDeviation:MAIN.StylusDeviation;
|
|
e->Deviation=MAIN.PointerIsEraser?MAIN.EraserDeviation:MAIN.StylusDeviation;
|
|
@@ -6707,10 +6708,12 @@ static void la_RecordWacomMotions(XIRawEvent *event)
|
|
if(XIMaskIsSet(event->valuators.mask, 3) && XIMaskIsSet(event->valuators.mask, 4)){
|
|
if(XIMaskIsSet(event->valuators.mask, 3) && XIMaskIsSet(event->valuators.mask, 4)){
|
|
real x=valuator[3],y=valuator[4];
|
|
real x=valuator[3],y=valuator[4];
|
|
real orientation=atan2(y,x); real deviation=sqrt(x*x+y*y); deviation=rad(deviation);
|
|
real orientation=atan2(y,x); real deviation=sqrt(x*x+y*y); deviation=rad(deviation);
|
|
- //printf("%f %f\n",orientation,deviation);
|
|
|
|
if(IsStylus){ MAIN.StylusOrientation=orientation;MAIN.StylusDeviation=deviation; }
|
|
if(IsStylus){ MAIN.StylusOrientation=orientation;MAIN.StylusDeviation=deviation; }
|
|
else { MAIN.EraserOrientation=orientation;MAIN.EraserDeviation=deviation; }
|
|
else { MAIN.EraserOrientation=orientation;MAIN.EraserDeviation=deviation; }
|
|
- }
|
|
|
|
|
|
+ }else{ MAIN.StylusDeviation=MAIN.StylusOrientation=MAIN.EraserDeviation=MAIN.EraserOrientation=0; }
|
|
|
|
+ if(XIMaskIsSet(event->valuators.mask, 5)){
|
|
|
|
+ real angle=valuator[5]; angle=(900-angle)/10*2; MAIN.StylusTwist=angle;
|
|
|
|
+ }else{ MAIN.StylusTwist=0; }
|
|
|
|
|
|
MAIN.IsPen=1;
|
|
MAIN.IsPen=1;
|
|
}
|
|
}
|