*/}}
Browse Source

Linux fixes

YimingWu 1 year ago
parent
commit
dead603b2c
1 changed files with 2 additions and 2 deletions
  1. 2 2
      la_kernel.c

+ 2 - 2
la_kernel.c

@@ -1179,7 +1179,7 @@ void la_SaveEvent(SYSWINDOW hwnd, laEvent *e, int use_last_pos){
 
     e->Pressure=MAIN.IsPen?(MAIN.PointerIsEraser?MAIN.EraserPressure:MAIN.StylusPressure):0.5f;
     e->Orientation=MAIN.PointerIsEraser?MAIN.EraserOrientation:MAIN.StylusOrientation;
-    e->Deviation=rad(MAIN.PointerIsEraser?MAIN.EraserDeviation:MAIN.StylusDeviation);
+    e->Deviation=MAIN.PointerIsEraser?MAIN.EraserDeviation:MAIN.StylusDeviation;
     e->IsEraser=MAIN.PointerIsEraser;
     e->GoodPressure=MAIN.IsPen;
 
@@ -6670,7 +6670,7 @@ static void la_RecordWacomMotions(XIRawEvent *event)
     if(XIMaskIsSet(event->valuators.mask, 2)){ if(IsStylus) MAIN.StylusPressure=valuator[2]/MAIN.StylusMaxPressure; else MAIN.EraserPressure=valuator[2]/MAIN.EraserMaxPressure; }
     if(XIMaskIsSet(event->valuators.mask, 3) && XIMaskIsSet(event->valuators.mask, 4)){
         real x=valuator[3],y=valuator[4];
-        real orientation=atan2(y,x); real deviation=sqrt(x*x+y*y);
+        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; }
         else { MAIN.EraserOrientation=orientation;MAIN.EraserDeviation=deviation; }