[PATCH joystick 6/9] Purge use of XI_PRIVATE macro.

Peter Hutterer peter.hutterer at who-t.net
Tue Dec 14 18:58:11 PST 2010


Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 src/jstk.c      |    2 +-
 src/jstk_axis.c |    6 ++++--
 src/jstk_key.c  |    3 ++-
 3 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/src/jstk.c b/src/jstk.c
index 76526b5..052675d 100644
--- a/src/jstk.c
+++ b/src/jstk.c
@@ -293,7 +293,7 @@ jstkDeviceControlProc(DeviceIntPtr       pJstk,
 {
     int i;
     InputInfoPtr     pInfo = (InputInfoPtr)pJstk->public.devicePrivate;
-    JoystickDevPtr   priv  = (JoystickDevPtr)XI_PRIVATE(pJstk);
+    JoystickDevPtr   priv  = pInfo->private;
     Atom             btn_labels[BUTTONMAP_SIZE+1] = {0}; /* TODO: fillme */
     Atom             axes_labels[MAXAXES] = {0}; /* TODO: fillme */
 
diff --git a/src/jstk_axis.c b/src/jstk_axis.c
index 7bea816..95ebfe9 100644
--- a/src/jstk_axis.c
+++ b/src/jstk_axis.c
@@ -56,7 +56,8 @@ jstkAxisTimer(OsTimerPtr        timer,
 {
     #define NEXTTIMER 15
     DeviceIntPtr          device = (DeviceIntPtr)arg;
-    JoystickDevPtr        priv = (JoystickDevPtr)XI_PRIVATE(device);
+    InputInfoPtr          pInfo = device->public.devicePrivate;
+    JoystickDevPtr        priv  = pInfo->private;
 
     int sigstate, i;
     int nexttimer;
@@ -407,7 +408,8 @@ jstkPWMAxisTimer(OsTimerPtr        timer,
                  pointer           arg)
 {
     DeviceIntPtr          device = (DeviceIntPtr)arg;
-    JoystickDevPtr        priv = (JoystickDevPtr)XI_PRIVATE(device);
+    InputInfoPtr          pInfo = device->public.devicePrivate;
+    JoystickDevPtr        priv  = pInfo->private;
 
     int sigstate, i;
     int nexttimer;
diff --git a/src/jstk_key.c b/src/jstk_key.c
index ad9198c..bfca3a5 100644
--- a/src/jstk_key.c
+++ b/src/jstk_key.c
@@ -141,7 +141,8 @@ static Bool
 jstkKeyboardDeviceControlProc(DeviceIntPtr       dev,
                               int                what)
 {
-    JoystickDevPtr priv  = (JoystickDevPtr)XI_PRIVATE(dev);
+    InputInfoPtr pInfo = dev->public.devicePrivate;
+    JoystickDevPtr priv  = pInfo->private;
     if (!priv) {
         DBG(2, ErrorF("jstkKeyboardDeviceControlProc: priv == NULL\n"));
         return !Success;
-- 
1.7.3.3



More information about the xorg-devel mailing list