*/}}
YimingWu 1 anno fa
parent
commit
59c5bc27f2
1 ha cambiato i file con 3 aggiunte e 3 eliminazioni
  1. 3 3
      la_kernel.c

+ 3 - 3
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,8 +6670,8 @@ 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);
-        printf("%f %f\n",orientation,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; }
         else { MAIN.EraserOrientation=orientation;MAIN.EraserDeviation=deviation; }
     }