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:
Simon Thum 2008-07-23 11:10:22 +02:00 committed by Peter Hutterer
parent d40183c665
commit 4e32e6fb38
4 changed files with 18 additions and 7 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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 */

View File

@ -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 */