diff options
author | Simon Thum <simon.thum@gmx.de> | 2008-07-28 14:07:48 +0200 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2008-08-04 15:13:37 +0930 |
commit | d762c08aebe3b7e8c88e2e7a6fcf66057a21b403 (patch) | |
tree | e7764407905e13a90f08aa1b731c7fde5a707ce3 /dix/ptrveloc.c | |
parent | 18e9fd69fe01298d825b46415b9c6bd86c75dfe5 (diff) |
dix: export driver-side functions for acceleration
also add additional safety for accel driver api
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'dix/ptrveloc.c')
-rw-r--r-- | dix/ptrveloc.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/dix/ptrveloc.c b/dix/ptrveloc.c index 70057e92d..64b1c359b 100644 --- a/dix/ptrveloc.c +++ b/dix/ptrveloc.c @@ -695,7 +695,7 @@ LinearProfile( * would be a good place, since FreeVelocityData() also calls this with -1. * returns FALSE (0) if profile number is unavailable. */ -int +_X_EXPORT int SetAccelerationProfile( DeviceVelocityPtr s, int profile_num) @@ -744,6 +744,11 @@ SetAccelerationProfile( return TRUE; } +/********************************************** + * driver interaction + **********************************************/ + + /** * device-specific profile * @@ -753,7 +758,7 @@ SetAccelerationProfile( * it should do init/uninit in the driver (ie. with DEVICE_INIT and friends). * Users may override or choose it. */ -extern void +_X_EXPORT void SetDeviceSpecificAccelerationProfile( DeviceVelocityPtr s, PointerAccelerationProfileFunc profile) @@ -766,11 +771,15 @@ SetDeviceSpecificAccelerationProfile( * Use this function to obtain a DeviceVelocityPtr for a device. Will return NULL if * the predictable acceleration scheme is not in effect. */ -DeviceVelocityPtr +_X_EXPORT DeviceVelocityPtr GetDevicePredictableAccelData( DeviceIntPtr pDev) { /*sanity check*/ + if(!pDev){ + ErrorF("[dix] accel: DeviceIntPtr was NULL"); + return NULL; + } if( pDev->valuator && pDev->valuator->accelScheme.AccelSchemeProc == acceleratePointerPredictable && |