dix: rename classic accel _scheme_ to lightweight to avoid confusion with
classic accel _profile_ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
d40183c665
commit
4e32e6fb38
|
@ -1269,10 +1269,14 @@ InitValuatorClassDeviceStruct(DeviceIntPtr dev, int numAxes,
|
|||
ValuatorAccelerationRec pointerAccelerationScheme[] = {
|
||||
{PtrAccelNoOp, NULL, NULL, NULL},
|
||||
{PtrAccelPredictable, acceleratePointerPredictable, NULL, AccelerationDefaultCleanup},
|
||||
{PtrAccelClassic, acceleratePointerClassic, NULL, NULL},
|
||||
{PtrAccelLightweight, acceleratePointerLightweight, NULL, NULL},
|
||||
{-1, NULL, NULL, NULL} /* terminator */
|
||||
};
|
||||
|
||||
/**
|
||||
* install an acceleration scheme. retrns TRUE on success, and should not
|
||||
* change anything if unsuccessful.
|
||||
*/
|
||||
_X_EXPORT Bool
|
||||
InitPointerAccelerationScheme(DeviceIntPtr dev,
|
||||
int scheme)
|
||||
|
@ -1281,7 +1285,9 @@ InitPointerAccelerationScheme(DeviceIntPtr dev,
|
|||
void* data = NULL;
|
||||
ValuatorClassPtr val;
|
||||
|
||||
if(dev->isMaster) /* bail out if called for master devs */
|
||||
val = dev->valuator;
|
||||
|
||||
if(!val || dev->isMaster) /* bail out if called for master devs */
|
||||
return FALSE;
|
||||
|
||||
for(x = 0; pointerAccelerationScheme[x].number >= 0; x++) {
|
||||
|
@ -1301,6 +1307,8 @@ InitPointerAccelerationScheme(DeviceIntPtr dev,
|
|||
{
|
||||
DeviceVelocityPtr s;
|
||||
s = (DeviceVelocityPtr)xalloc(sizeof(DeviceVelocityRec));
|
||||
if(!s)
|
||||
return FALSE;
|
||||
InitVelocityData(s);
|
||||
data = s;
|
||||
break;
|
||||
|
@ -1309,7 +1317,6 @@ InitPointerAccelerationScheme(DeviceIntPtr dev,
|
|||
break;
|
||||
}
|
||||
|
||||
val = dev->valuator;
|
||||
val->accelScheme = pointerAccelerationScheme[i];
|
||||
val->accelScheme.accelData = data;
|
||||
|
||||
|
|
|
@ -722,8 +722,12 @@ acceleratePointerPredictable(DeviceIntPtr pDev, int first_valuator,
|
|||
* in-place. Retained mostly for embedded scenarios.
|
||||
*/
|
||||
void
|
||||
acceleratePointerClassic(DeviceIntPtr pDev, int first_valuator,
|
||||
int num_valuators, int *valuators, int ignored)
|
||||
acceleratePointerLightweight(
|
||||
DeviceIntPtr pDev,
|
||||
int first_valuator,
|
||||
int num_valuators,
|
||||
int *valuators,
|
||||
int ignored)
|
||||
{
|
||||
float mult = 0.0;
|
||||
int dx = 0, dy = 0;
|
||||
|
|
|
@ -66,7 +66,7 @@ SOFTWARE.
|
|||
/*int constants for pointer acceleration schemes*/
|
||||
#define PtrAccelNoOp 0
|
||||
#define PtrAccelPredictable 1
|
||||
#define PtrAccelClassic 2
|
||||
#define PtrAccelLightweight 2
|
||||
#define PtrAccelDefault PtrAccelPredictable
|
||||
|
||||
#define MAX_VALUATORS 36 /* XXX from comment in dix/getevents.c */
|
||||
|
|
|
@ -103,7 +103,7 @@ acceleratePointerPredictable(DeviceIntPtr pDev, int first_valuator,
|
|||
int num_valuators, int *valuators, int evtime);
|
||||
|
||||
extern void
|
||||
acceleratePointerClassic(DeviceIntPtr pDev, int first_valuator,
|
||||
acceleratePointerLightweight(DeviceIntPtr pDev, int first_valuator,
|
||||
int num_valuators, int *valuators, int ignore);
|
||||
|
||||
#endif /* POINTERVELOCITY_H */
|
||||
|
|
Loading…
Reference in New Issue
Block a user