whitespace fixes
Signed-off-by: Simon Thum <simon.thum@gmx.de> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
		
							parent
							
								
									14039b5a79
								
							
						
					
					
						commit
						1aca2d7575
					
				| 
						 | 
				
			
			@ -121,7 +121,7 @@ ProcessVelocityConfiguration(DeviceIntPtr pDev, char* devname, pointer list,
 | 
			
		|||
 | 
			
		||||
    /* common settings (available via device properties) */
 | 
			
		||||
    tempf = xf86SetRealOption(list, "ConstantDeceleration", 1.0);
 | 
			
		||||
    if(tempf > 1.0){
 | 
			
		||||
    if (tempf > 1.0) {
 | 
			
		||||
        xf86Msg(X_CONFIG, "%s: (accel) constant deceleration by %.1f\n",
 | 
			
		||||
                devname, tempf);
 | 
			
		||||
        prop = XIGetKnownProperty(ACCEL_PROP_CONSTANT_DECELERATION);
 | 
			
		||||
| 
						 | 
				
			
			@ -130,7 +130,7 @@ ProcessVelocityConfiguration(DeviceIntPtr pDev, char* devname, pointer list,
 | 
			
		|||
    }
 | 
			
		||||
 | 
			
		||||
    tempf = xf86SetRealOption(list, "AdaptiveDeceleration", 1.0);
 | 
			
		||||
    if(tempf > 1.0){
 | 
			
		||||
    if (tempf > 1.0) {
 | 
			
		||||
        xf86Msg(X_CONFIG, "%s: (accel) adaptive deceleration by %.1f\n",
 | 
			
		||||
                devname, tempf);
 | 
			
		||||
        prop = XIGetKnownProperty(ACCEL_PROP_ADAPTIVE_DECELERATION);
 | 
			
		||||
| 
						 | 
				
			
			@ -144,8 +144,7 @@ ProcessVelocityConfiguration(DeviceIntPtr pDev, char* devname, pointer list,
 | 
			
		|||
 | 
			
		||||
    prop = XIGetKnownProperty(ACCEL_PROP_PROFILE_NUMBER);
 | 
			
		||||
    if (XIChangeDeviceProperty(pDev, prop, XA_INTEGER, 32,
 | 
			
		||||
                               PropModeReplace, 1, &tempi, FALSE) == Success)
 | 
			
		||||
    {
 | 
			
		||||
                               PropModeReplace, 1, &tempi, FALSE) == Success) {
 | 
			
		||||
        xf86Msg(X_CONFIG, "%s: (accel) acceleration profile %i\n", devname,
 | 
			
		||||
                tempi);
 | 
			
		||||
    } else {
 | 
			
		||||
| 
						 | 
				
			
			@ -156,20 +155,19 @@ ProcessVelocityConfiguration(DeviceIntPtr pDev, char* devname, pointer list,
 | 
			
		|||
    /* set scaling */
 | 
			
		||||
    tempf = xf86SetRealOption(list, "ExpectedRate", 0);
 | 
			
		||||
    prop = XIGetKnownProperty(ACCEL_PROP_VELOCITY_SCALING);
 | 
			
		||||
    if(tempf > 0){
 | 
			
		||||
    if (tempf > 0) {
 | 
			
		||||
        tempf = 1000.0 / tempf;
 | 
			
		||||
        XIChangeDeviceProperty(pDev, prop, float_prop, 32,
 | 
			
		||||
                               PropModeReplace, 1, &tempf, FALSE);
 | 
			
		||||
    }else{
 | 
			
		||||
    } else {
 | 
			
		||||
        tempf = xf86SetRealOption(list, "VelocityScale", s->corr_mul);
 | 
			
		||||
        XIChangeDeviceProperty(pDev, prop, float_prop, 32,
 | 
			
		||||
                               PropModeReplace, 1, &tempf, FALSE);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    tempi = xf86SetIntOption(list, "VelocityTrackerCount", -1);
 | 
			
		||||
    if(tempi > 1){
 | 
			
		||||
    if (tempi > 1)
 | 
			
		||||
	InitTrackers(s, tempi);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    s->initial_range = xf86SetIntOption(list, "VelocityInitialRange",
 | 
			
		||||
                                        s->initial_range);
 | 
			
		||||
| 
						 | 
				
			
			@ -177,7 +175,7 @@ ProcessVelocityConfiguration(DeviceIntPtr pDev, char* devname, pointer list,
 | 
			
		|||
    s->max_diff = xf86SetRealOption(list, "VelocityAbsDiff", s->max_diff);
 | 
			
		||||
 | 
			
		||||
    tempf = xf86SetRealOption(list, "VelocityRelDiff", -1);
 | 
			
		||||
    if(tempf >= 0){
 | 
			
		||||
    if (tempf >= 0) {
 | 
			
		||||
	xf86Msg(X_CONFIG, "%s: (accel) max rel. velocity difference: %.1f%%\n",
 | 
			
		||||
	        devname, tempf*100.0);
 | 
			
		||||
	s->max_rel_diff = tempf;
 | 
			
		||||
| 
						 | 
				
			
			@ -208,30 +206,30 @@ ApplyAccelerationSettings(DeviceIntPtr dev){
 | 
			
		|||
 | 
			
		||||
	scheme = dev->valuator->accelScheme.number;
 | 
			
		||||
 | 
			
		||||
	if(!xf86NameCmp(schemeStr, "predictable"))
 | 
			
		||||
	if (!xf86NameCmp(schemeStr, "predictable"))
 | 
			
		||||
	    scheme = PtrAccelPredictable;
 | 
			
		||||
 | 
			
		||||
	if(!xf86NameCmp(schemeStr, "lightweight"))
 | 
			
		||||
	if (!xf86NameCmp(schemeStr, "lightweight"))
 | 
			
		||||
	    scheme = PtrAccelLightweight;
 | 
			
		||||
 | 
			
		||||
	if(!xf86NameCmp(schemeStr, "none"))
 | 
			
		||||
	if (!xf86NameCmp(schemeStr, "none"))
 | 
			
		||||
	    scheme = PtrAccelNoOp;
 | 
			
		||||
 | 
			
		||||
        /* reinit scheme if needed */
 | 
			
		||||
        if(dev->valuator->accelScheme.number != scheme){
 | 
			
		||||
            if(dev->valuator->accelScheme.AccelCleanupProc){
 | 
			
		||||
        if (dev->valuator->accelScheme.number != scheme) {
 | 
			
		||||
            if (dev->valuator->accelScheme.AccelCleanupProc) {
 | 
			
		||||
                dev->valuator->accelScheme.AccelCleanupProc(dev);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            if(InitPointerAccelerationScheme(dev, scheme)){
 | 
			
		||||
            if (InitPointerAccelerationScheme(dev, scheme)) {
 | 
			
		||||
		xf86Msg(X_CONFIG, "%s: (accel) selected scheme %s/%i\n",
 | 
			
		||||
		        local->name, schemeStr, scheme);
 | 
			
		||||
	    }else{
 | 
			
		||||
	    } else {
 | 
			
		||||
        	xf86Msg(X_CONFIG, "%s: (accel) could not init scheme %s\n",
 | 
			
		||||
        	        local->name, schemeStr);
 | 
			
		||||
        	scheme = dev->valuator->accelScheme.number;
 | 
			
		||||
            }
 | 
			
		||||
        }else{
 | 
			
		||||
        } else {
 | 
			
		||||
            xf86Msg(X_CONFIG, "%s: (accel) keeping acceleration scheme %i\n",
 | 
			
		||||
                    local->name, scheme);
 | 
			
		||||
        }
 | 
			
		||||
| 
						 | 
				
			
			@ -239,7 +237,7 @@ ApplyAccelerationSettings(DeviceIntPtr dev){
 | 
			
		|||
        xfree(schemeStr);
 | 
			
		||||
 | 
			
		||||
        /* process special configuration */
 | 
			
		||||
        switch(scheme){
 | 
			
		||||
        switch (scheme) {
 | 
			
		||||
            case PtrAccelPredictable:
 | 
			
		||||
                pVel = GetDevicePredictableAccelData(dev);
 | 
			
		||||
                ProcessVelocityConfiguration (dev, local->name, local->options,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue