summaryrefslogtreecommitdiff
path: root/src/vmmouse.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vmmouse.c')
-rw-r--r--src/vmmouse.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/vmmouse.c b/src/vmmouse.c
index 00960cc..86f1ccf 100644
--- a/src/vmmouse.c
+++ b/src/vmmouse.c
@@ -217,6 +217,17 @@ static char reverseMap[32] = { 0, 4, 2, 6, 1, 5, 3, 7,
#define reverseBits(map, b) (((b) & ~0x0f) | map[(b) & 0x0f])
+static InputInfoPtr
+VMMouseInitPassthru(InputDriverPtr drv, IDevPtr dev, int flags)
+{
+ InputDriverRec *passthruMouse;
+ passthruMouse = (InputDriverRec *)LoaderSymbol("MOUSE");
+ if(passthruMouse != NULL) {
+ return (passthruMouse->PreInit)(drv, dev, flags);
+ } else {
+ return NULL;
+ }
+}
/*
*----------------------------------------------------------------------
@@ -274,16 +285,9 @@ VMMousePreInit(InputDriverPtr drv, IDevPtr dev, int flags)
* vmmouse failed
* Fall back to normal mouse module
*/
- InputDriverRec *passthruMouse;
xf86Msg(X_ERROR, "VMWARE(0): vmmouse enable failed\n");
- passthruMouse = (InputDriverRec *)LoaderSymbol("MOUSE");
free(mPriv);
- if(passthruMouse != NULL){
- return (passthruMouse->PreInit)(drv, dev, flags);
- } else {
- return NULL;
- }
-
+ return VMMouseInitPassthru(drv, dev, flags);
} else {
/*
* vmmouse is available