Some cleanup:
* remove trailing whitespace * remove odd pInfo->private = priv * remove wsChangeControl (not used) * remove useless actions in wsControlProc ok matthieu@
This commit is contained in:
parent
d8018cb6ce
commit
6d15c8ed7e
@ -13,7 +13,7 @@
|
|||||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
/* $OpenBSD: ws.c,v 1.33 2011/07/16 17:51:30 matthieu Exp $ */
|
/* $OpenBSD: ws.c,v 1.34 2011/10/16 17:54:07 shadchin Exp $ */
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
@ -126,7 +126,7 @@ TearDownProc(pointer p)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
wsPreInit12(InputDriverPtr drv, InputInfoPtr pInfo, int flags)
|
wsPreInit12(InputDriverPtr drv, InputInfoPtr pInfo, int flags)
|
||||||
{
|
{
|
||||||
WSDevicePtr priv;
|
WSDevicePtr priv;
|
||||||
@ -320,9 +320,7 @@ wsPreInit12(InputDriverPtr drv, InputInfoPtr pInfo, int flags)
|
|||||||
|
|
||||||
pInfo->device_control = wsProc;
|
pInfo->device_control = wsProc;
|
||||||
pInfo->read_input = wsReadInput;
|
pInfo->read_input = wsReadInput;
|
||||||
pInfo->control_proc = wsChangeControl;
|
|
||||||
pInfo->switch_mode = wsSwitchMode;
|
pInfo->switch_mode = wsSwitchMode;
|
||||||
pInfo->private = priv;
|
|
||||||
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12
|
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12
|
||||||
pInfo->conversion_proc = NULL;
|
pInfo->conversion_proc = NULL;
|
||||||
pInfo->reverse_conversion_proc = NULL;
|
pInfo->reverse_conversion_proc = NULL;
|
||||||
@ -617,7 +615,7 @@ wsReadInput(InputInfoPtr pInfo)
|
|||||||
break;
|
break;
|
||||||
case WSCONS_EVENT_MOUSE_ABSOLUTE_X:
|
case WSCONS_EVENT_MOUSE_ABSOLUTE_X:
|
||||||
DBG(4, ErrorF("Absolute X %d\n", event->value));
|
DBG(4, ErrorF("Absolute X %d\n", event->value));
|
||||||
if (event->value == 4095)
|
if (event->value == 4095)
|
||||||
break;
|
break;
|
||||||
ax = event->value;
|
ax = event->value;
|
||||||
if (priv->inv_x)
|
if (priv->inv_x)
|
||||||
@ -740,12 +738,6 @@ wsSendButtons(InputInfoPtr pInfo, int buttons)
|
|||||||
} /* wsSendButtons */
|
} /* wsSendButtons */
|
||||||
|
|
||||||
|
|
||||||
static int
|
|
||||||
wsChangeControl(InputInfoPtr pInfo, xDeviceCtl *control)
|
|
||||||
{
|
|
||||||
return BadMatch;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
wsSwitchMode(ClientPtr client, DeviceIntPtr dev, int mode)
|
wsSwitchMode(ClientPtr client, DeviceIntPtr dev, int mode)
|
||||||
{
|
{
|
||||||
@ -786,13 +778,8 @@ wsClose(InputInfoPtr pInfo)
|
|||||||
static void
|
static void
|
||||||
wsControlProc(DeviceIntPtr device, PtrCtrl *ctrl)
|
wsControlProc(DeviceIntPtr device, PtrCtrl *ctrl)
|
||||||
{
|
{
|
||||||
InputInfoPtr pInfo = device->public.devicePrivate;
|
/* Nothing to do, dix handles all settings */
|
||||||
WSDevicePtr priv = (WSDevicePtr)pInfo->private;
|
|
||||||
|
|
||||||
DBG(1, ErrorF("wsControlProc\n"));
|
DBG(1, ErrorF("wsControlProc\n"));
|
||||||
priv->num = ctrl->num;
|
|
||||||
priv->den = ctrl->den;
|
|
||||||
priv->threshold = ctrl->threshold;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -42,7 +42,6 @@ typedef struct WSDevice {
|
|||||||
int raw;
|
int raw;
|
||||||
int inv_x, inv_y;
|
int inv_x, inv_y;
|
||||||
int screen_no;
|
int screen_no;
|
||||||
int num, den, threshold; /* relative accel params */
|
|
||||||
pointer buffer;
|
pointer buffer;
|
||||||
int negativeZ, positiveZ; /* mappings for Z axis */
|
int negativeZ, positiveZ; /* mappings for Z axis */
|
||||||
int negativeW, positiveW; /* mappings for W axis */
|
int negativeW, positiveW; /* mappings for W axis */
|
||||||
|
Loading…
Reference in New Issue
Block a user