|
@@ -193,7 +193,9 @@ void la_UpdateControllerStatus(){
|
|
|
}
|
|
|
else if(event.type == EV_ABS){
|
|
|
int idx = la_ControllerAxisToIndex(c,event.code); if(idx<0) continue; HasEvent=1;
|
|
|
- c->AxisValues[idx]=rint(tnsLinearItp(-32768.0f,32767.0f,((real)event.value/(c->AxisMaxes[idx]-c->AxisMins[idx]))));
|
|
|
+ c->AxisValues[idx]=rint(tnsLinearItp(-32768.0f,32767.0f,(((real)event.value-c->AxisMins[idx])/(c->AxisMaxes[idx]-c->AxisMins[idx]))));
|
|
|
+ if(idx>4)
|
|
|
+ printf("%d %d\n",event.value,idx);
|
|
|
if(abs(c->AxisValues[idx]-c->SaveAxisValues[idx])>10000){ c->SaveAxisValues[idx]=c->AxisValues[idx];
|
|
|
MAIN.LastControllerAxis=idx; MAIN.LastControllerAxisDevice=c->UserAssignedID; MAIN.ControllerHasNewAxis = 1; laRetriggerOperators();
|
|
|
}
|