1 /* DirectInput Joystick device
3 * Copyright 1998 Marcus Meissner
4 * Copyright 1998,1999 Lionel Ulmer
5 * Copyright 2000-2001 TransGaming Technologies Inc.
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 #include "wine/port.h"
25 #ifdef HAVE_LINUX_22_JOYSTICK_API
34 #ifdef HAVE_SYS_TIME_H
35 # include <sys/time.h>
37 #include <sys/fcntl.h>
38 #ifdef HAVE_SYS_IOCTL_H
39 # include <sys/ioctl.h>
42 #ifdef HAVE_SYS_ERRNO_H
43 # include <sys/errno.h>
45 #ifdef HAVE_LINUX_IOCTL_H
46 # include <linux/ioctl.h>
48 #ifdef HAVE_LINUX_JOYSTICK_H
49 # include <linux/joystick.h>
51 #define JOYDEV "/dev/js0"
53 #include "wine/debug.h"
54 #include "wine/unicode.h"
60 #include "dinput_private.h"
61 #include "device_private.h"
63 WINE_DEFAULT_DEBUG_CHANNEL(dinput);
65 /* Wine joystick driver object instances */
66 #define WINE_JOYSTICK_AXIS_BASE 0
67 #define WINE_JOYSTICK_BUTTON_BASE 8
69 typedef struct JoystickImpl JoystickImpl;
70 static ICOM_VTABLE(IDirectInputDevice8A) JoystickAvt;
71 static ICOM_VTABLE(IDirectInputDevice8W) JoystickWvt;
78 /* The 'parent' DInput */
79 IDirectInputImpl *dinput;
81 /* joystick private */
85 LONG lMin,lMax,deadzone;
86 LPDIDEVICEOBJECTDATA data_queue;
87 int queue_head, queue_tail, queue_len;
91 static GUID DInput_Wine_Joystick_GUID = { /* 9e573ed9-7734-11d2-8d4a-23903fb6bdf7 */
95 {0x8d, 0x4a, 0x23, 0x90, 0x3f, 0xb6, 0xbd, 0xf7}
98 static BOOL joydev_enum_deviceA(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINSTANCEA lpddi, int version)
102 if (dwFlags & DIEDFL_FORCEFEEDBACK)
105 if ((dwDevType==0) || (GET_DIDEVICE_TYPE(dwDevType)==DIDEVTYPE_JOYSTICK)) {
106 /* check whether we have a joystick */
107 if ((fd = open(JOYDEV,O_RDONLY) != -1) || (errno!=ENODEV && errno!=ENOENT)) {
108 TRACE("Enumerating the linux Joystick device\n");
110 /* Return joystick */
111 lpddi->guidInstance = GUID_Joystick;
112 lpddi->guidProduct = DInput_Wine_Joystick_GUID;
113 /* we only support traditional joysticks for now */
115 lpddi->dwDevType = DI8DEVTYPE_JOYSTICK | (DI8DEVTYPEJOYSTICK_STANDARD << 8);
117 lpddi->dwDevType = DIDEVTYPE_JOYSTICK | (DIDEVTYPEJOYSTICK_TRADITIONAL << 8);
118 strcpy(lpddi->tszInstanceName, "Joystick");
119 /* ioctl JSIOCGNAME(len) */
120 strcpy(lpddi->tszProductName, "Wine Joystick");
122 lpddi->guidFFDriver = GUID_NULL;
132 static BOOL joydev_enum_deviceW(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINSTANCEW lpddi, int version)
136 if (dwFlags & DIEDFL_FORCEFEEDBACK)
139 if ((dwDevType==0) || (GET_DIDEVICE_TYPE(dwDevType)==DIDEVTYPE_JOYSTICK)) {
140 /* check whether we have a joystick */
141 if ((fd = open(JOYDEV,O_RDONLY) != -1) || (errno!=ENODEV && errno!=ENOENT)) {
142 TRACE("Enumerating the linux Joystick device\n");
144 /* Return joystick */
145 lpddi->guidInstance = GUID_Joystick;
146 lpddi->guidProduct = DInput_Wine_Joystick_GUID;
147 /* we only support traditional joysticks for now */
148 lpddi->dwDevType = DIDEVTYPE_JOYSTICK |
149 (DIDEVTYPEJOYSTICK_TRADITIONAL<<8);
151 MultiByteToWideChar(CP_ACP, 0, "Joystick", -1, lpddi->tszInstanceName, MAX_PATH);
152 /* ioctl JSIOCGNAME(len) */
153 MultiByteToWideChar(CP_ACP, 0, "Wine Joystick", -1, lpddi->tszProductName, MAX_PATH);
154 lpddi->guidFFDriver = GUID_NULL;
164 static JoystickImpl *alloc_device(REFGUID rguid, LPVOID jvt, IDirectInputImpl *dinput)
166 JoystickImpl* newDevice;
168 newDevice = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(JoystickImpl));
169 newDevice->lpVtbl = jvt;
171 newDevice->joyfd = -1;
172 newDevice->lMin = -32768;
173 newDevice->lMax = +32767;
174 newDevice->dinput = dinput;
175 memcpy(&(newDevice->guid),rguid,sizeof(*rguid));
180 static HRESULT joydev_create_deviceA(IDirectInputImpl *dinput, REFGUID rguid, REFIID riid, LPDIRECTINPUTDEVICEA* pdev)
182 if ((IsEqualGUID(&GUID_Joystick,rguid)) ||
183 (IsEqualGUID(&DInput_Wine_Joystick_GUID,rguid))) {
184 if ((riid == NULL) ||
185 IsEqualGUID(&IID_IDirectInputDeviceA,riid) ||
186 IsEqualGUID(&IID_IDirectInputDevice2A,riid) ||
187 IsEqualGUID(&IID_IDirectInputDevice7A,riid) ||
188 IsEqualGUID(&IID_IDirectInputDevice8A,riid)) {
189 *pdev=(IDirectInputDeviceA*) alloc_device(rguid, &JoystickAvt, dinput);
191 TRACE("Creating a Joystick device (%p)\n", *pdev);
194 return DIERR_NOINTERFACE;
197 return DIERR_DEVICENOTREG;
200 static HRESULT joydev_create_deviceW(IDirectInputImpl *dinput, REFGUID rguid, REFIID riid, LPDIRECTINPUTDEVICEW* pdev)
202 if ((IsEqualGUID(&GUID_Joystick,rguid)) ||
203 (IsEqualGUID(&DInput_Wine_Joystick_GUID,rguid))) {
204 if ((riid == NULL) ||
205 IsEqualGUID(&IID_IDirectInputDeviceW,riid) ||
206 IsEqualGUID(&IID_IDirectInputDevice2W,riid) ||
207 IsEqualGUID(&IID_IDirectInputDevice7W,riid) ||
208 IsEqualGUID(&IID_IDirectInputDevice8W,riid)) {
209 *pdev = (IDirectInputDeviceW*) alloc_device(rguid, &JoystickWvt, dinput);
211 TRACE("Creating a Joystick device (%p)\n", *pdev);
214 return DIERR_NOINTERFACE;
217 return DIERR_DEVICENOTREG;
220 static dinput_device joydev = {
224 joydev_create_deviceA,
225 joydev_create_deviceW
228 DECL_GLOBAL_CONSTRUCTOR(joydev_register) { dinput_register_device(&joydev); }
230 /******************************************************************************
233 static ULONG WINAPI JoystickAImpl_Release(LPDIRECTINPUTDEVICE8A iface)
235 ICOM_THIS(JoystickImpl,iface);
241 /* Free the data queue */
242 if (This->data_queue != NULL)
243 HeapFree(GetProcessHeap(),0,This->data_queue);
245 /* Free the DataFormat */
246 HeapFree(GetProcessHeap(), 0, This->df);
248 HeapFree(GetProcessHeap(),0,This);
252 /******************************************************************************
253 * SetDataFormat : the application can choose the format of the data
254 * the device driver sends back with GetDeviceState.
256 static HRESULT WINAPI JoystickAImpl_SetDataFormat(
257 LPDIRECTINPUTDEVICE8A iface,LPCDIDATAFORMAT df
260 ICOM_THIS(JoystickImpl,iface);
263 TRACE("(this=%p,%p)\n",This,df);
265 TRACE("(df.dwSize=%ld)\n",df->dwSize);
266 TRACE("(df.dwObjsize=%ld)\n",df->dwObjSize);
267 TRACE("(df.dwFlags=0x%08lx)\n",df->dwFlags);
268 TRACE("(df.dwDataSize=%ld)\n",df->dwDataSize);
269 TRACE("(df.dwNumObjs=%ld)\n",df->dwNumObjs);
271 for (i=0;i<df->dwNumObjs;i++) {
272 TRACE("df.rgodf[%d].guid %s (%p)\n",i,debugstr_guid(df->rgodf[i].pguid), df->rgodf[i].pguid);
273 TRACE("df.rgodf[%d].dwOfs %ld\n",i,df->rgodf[i].dwOfs);
274 TRACE("dwType 0x%02x,dwInstance %d\n",DIDFT_GETTYPE(df->rgodf[i].dwType),DIDFT_GETINSTANCE(df->rgodf[i].dwType));
275 TRACE("df.rgodf[%d].dwFlags 0x%08lx\n",i,df->rgodf[i].dwFlags);
278 /* Store the new data format */
279 This->df = HeapAlloc(GetProcessHeap(),0,df->dwSize);
280 memcpy(This->df, df, df->dwSize);
281 This->df->rgodf = HeapAlloc(GetProcessHeap(),0,df->dwNumObjs*df->dwObjSize);
282 memcpy(This->df->rgodf,df->rgodf,df->dwNumObjs*df->dwObjSize);
287 /******************************************************************************
288 * Acquire : gets exclusive control of the joystick
290 static HRESULT WINAPI JoystickAImpl_Acquire(LPDIRECTINPUTDEVICE8A iface)
292 ICOM_THIS(JoystickImpl,iface);
294 TRACE("(this=%p)\n",This);
297 This->joyfd=open(JOYDEV,O_RDONLY);
299 return DIERR_NOTFOUND;
303 /******************************************************************************
304 * Unacquire : frees the joystick
306 static HRESULT WINAPI JoystickAImpl_Unacquire(LPDIRECTINPUTDEVICE8A iface)
308 ICOM_THIS(JoystickImpl,iface);
310 TRACE("(this=%p)\n",This);
311 if (This->joyfd!=-1) {
320 #define map_axis(val) ((val+32768)*(This->lMax-This->lMin)/65536+This->lMin)
322 static void joy_polldev(JoystickImpl *This) {
330 memset(&tv,0,sizeof(tv));
331 FD_ZERO(&readfds);FD_SET(This->joyfd,&readfds);
332 if (1>select(This->joyfd+1,&readfds,NULL,NULL,&tv))
334 /* we have one event, so we can read */
335 if (sizeof(jse)!=read(This->joyfd,&jse,sizeof(jse))) {
338 TRACE("js_event: type 0x%x, number %d, value %d\n",jse.type,jse.number,jse.value);
339 if (jse.type & JS_EVENT_BUTTON) {
340 GEN_EVENT(DIJOFS_BUTTON(jse.number),jse.value?0x80:0x00,jse.time,(This->dinput->evsequence)++);
341 This->js.rgbButtons[jse.number] = jse.value?0x80:0x00;
343 if (jse.type & JS_EVENT_AXIS) {
344 switch (jse.number) {
346 GEN_EVENT(jse.number*4,jse.value,jse.time,(This->dinput->evsequence)++);
347 This->js.lX = map_axis(jse.value);
350 GEN_EVENT(jse.number*4,jse.value,jse.time,(This->dinput->evsequence)++);
351 This->js.lY = map_axis(jse.value);
354 GEN_EVENT(jse.number*4,jse.value,jse.time,(This->dinput->evsequence)++);
355 This->js.lZ = map_axis(jse.value);
358 FIXME("more than 3 axes (%d) not handled!\n",jse.number);
365 /******************************************************************************
366 * GetDeviceState : returns the "state" of the joystick.
369 static HRESULT WINAPI JoystickAImpl_GetDeviceState(
370 LPDIRECTINPUTDEVICE8A iface,DWORD len,LPVOID ptr
372 ICOM_THIS(JoystickImpl,iface);
375 TRACE("(this=%p,0x%08lx,%p)\n",This,len,ptr);
376 if ((len != sizeof(DIJOYSTATE)) && (len != sizeof(DIJOYSTATE2))) {
377 FIXME("len %ld is not sizeof(DIJOYSTATE), unsupported format.\n",len);
380 memcpy(ptr,&(This->js),len);
381 This->queue_head = 0;
382 This->queue_tail = 0;
386 /******************************************************************************
387 * GetDeviceData : gets buffered input data.
389 static HRESULT WINAPI JoystickAImpl_GetDeviceData(LPDIRECTINPUTDEVICE8A iface,
391 LPDIDEVICEOBJECTDATA dod,
395 ICOM_THIS(JoystickImpl,iface);
397 FIXME("(%p)->(dods=%ld,entries=%ld,fl=0x%08lx),STUB!\n",This,dodsize,*entries,flags);
400 if (flags & DIGDD_PEEK)
401 FIXME("DIGDD_PEEK\n");
409 /******************************************************************************
410 * SetProperty : change input device properties
412 static HRESULT WINAPI JoystickAImpl_SetProperty(LPDIRECTINPUTDEVICE8A iface,
416 ICOM_THIS(JoystickImpl,iface);
418 FIXME("(this=%p,%s,%p)\n",This,debugstr_guid(rguid),ph);
419 FIXME("ph.dwSize = %ld, ph.dwHeaderSize =%ld, ph.dwObj = %ld, ph.dwHow= %ld\n",ph->dwSize, ph->dwHeaderSize,ph->dwObj,ph->dwHow);
421 if (!HIWORD(rguid)) {
422 switch ((DWORD)rguid) {
423 case (DWORD) DIPROP_BUFFERSIZE: {
424 LPCDIPROPDWORD pd = (LPCDIPROPDWORD)ph;
426 FIXME("buffersize = %ld\n",pd->dwData);
429 case (DWORD)DIPROP_RANGE: {
430 LPCDIPROPRANGE pr = (LPCDIPROPRANGE)ph;
432 FIXME("proprange(%ld,%ld)\n",pr->lMin,pr->lMax);
433 This->lMin = pr->lMin;
434 This->lMax = pr->lMax;
437 case (DWORD)DIPROP_DEADZONE: {
438 LPCDIPROPDWORD pd = (LPCDIPROPDWORD)ph;
440 FIXME("deadzone(%ld)\n",pd->dwData);
441 This->deadzone = pd->dwData;
445 FIXME("Unknown type %ld (%s)\n",(DWORD)rguid,debugstr_guid(rguid));
452 /******************************************************************************
453 * SetEventNotification : specifies event to be sent on state change
455 static HRESULT WINAPI JoystickAImpl_SetEventNotification(
456 LPDIRECTINPUTDEVICE8A iface, HANDLE hnd
458 ICOM_THIS(JoystickImpl,iface);
460 TRACE("(this=%p,0x%08lx)\n",This,(DWORD)hnd);
465 static HRESULT WINAPI JoystickAImpl_GetCapabilities(
466 LPDIRECTINPUTDEVICE8A iface,
467 LPDIDEVCAPS lpDIDevCaps)
469 ICOM_THIS(JoystickImpl,iface);
471 int xfd = This->joyfd;
473 TRACE("%p->(%p)\n",iface,lpDIDevCaps);
475 xfd = open(JOYDEV,O_RDONLY);
476 lpDIDevCaps->dwFlags = DIDC_ATTACHED;
477 lpDIDevCaps->dwDevType = DIDEVTYPE_JOYSTICK;
479 if (-1==ioctl(xfd,JSIOCGAXES,&axes))
481 lpDIDevCaps->dwAxes = axes;
484 if (-1==ioctl(xfd,JSIOCGAXES,&buttons))
486 lpDIDevCaps->dwButtons = buttons;
488 if (xfd!=This->joyfd)
492 static HRESULT WINAPI JoystickAImpl_Poll(LPDIRECTINPUTDEVICE8A iface) {
493 ICOM_THIS(JoystickImpl,iface);
500 /******************************************************************************
501 * EnumObjects : enumerate the different buttons and axis...
503 static HRESULT WINAPI JoystickAImpl_EnumObjects(
504 LPDIRECTINPUTDEVICE8A iface,
505 LPDIENUMDEVICEOBJECTSCALLBACKA lpCallback,
509 ICOM_THIS(JoystickImpl,iface);
510 DIDEVICEOBJECTINSTANCEA ddoi;
511 int xfd = This->joyfd;
513 TRACE("(this=%p,%p,%p,%08lx)\n", This, lpCallback, lpvRef, dwFlags);
514 if (TRACE_ON(dinput)) {
515 TRACE(" - flags = ");
516 _dump_EnumObjects_flags(dwFlags);
520 /* Only the fields till dwFFMaxForce are relevant */
521 ddoi.dwSize = FIELD_OFFSET(DIDEVICEOBJECTINSTANCEA, dwFFMaxForce);
523 /* For the joystick, do as is done in the GetCapabilities function */
524 if ((dwFlags == DIDFT_ALL) ||
525 (dwFlags & DIDFT_AXIS)) {
529 if (-1==ioctl(xfd,JSIOCGAXES,&axes))
533 for (i = 0; i < axes; i++) {
536 ddoi.guidType = GUID_XAxis;
537 ddoi.dwOfs = DIJOFS_X;
540 ddoi.guidType = GUID_YAxis;
541 ddoi.dwOfs = DIJOFS_Y;
544 ddoi.guidType = GUID_ZAxis;
545 ddoi.dwOfs = DIJOFS_Z;
548 ddoi.guidType = GUID_Unknown;
549 ddoi.dwOfs = DIJOFS_Z + (i - 2) * sizeof(LONG);
551 ddoi.dwType = DIDFT_MAKEINSTANCE((0x0001 << i) << WINE_JOYSTICK_AXIS_BASE) | DIDFT_ABSAXIS;
552 sprintf(ddoi.tszName, "%d-Axis", i);
553 _dump_OBJECTINSTANCEA(&ddoi);
554 if (lpCallback(&ddoi, lpvRef) != DIENUM_CONTINUE) return DI_OK;
558 if ((dwFlags == DIDFT_ALL) ||
559 (dwFlags & DIDFT_BUTTON)) {
563 if (-1==ioctl(xfd,JSIOCGAXES,&buttons))
567 /* The DInput SDK says that GUID_Button is only for mouse buttons but well... */
568 ddoi.guidType = GUID_Button;
570 for (i = 0; i < buttons; i++) {
571 ddoi.dwOfs = DIJOFS_BUTTON(i);
572 ddoi.dwType = DIDFT_MAKEINSTANCE((0x0001 << i) << WINE_JOYSTICK_BUTTON_BASE) | DIDFT_PSHBUTTON;
573 sprintf(ddoi.tszName, "%d-Button", i);
574 _dump_OBJECTINSTANCEA(&ddoi);
575 if (lpCallback(&ddoi, lpvRef) != DIENUM_CONTINUE) return DI_OK;
579 if (xfd!=This->joyfd)
585 /******************************************************************************
586 * EnumObjects : enumerate the different buttons and axis...
588 static HRESULT WINAPI JoystickWImpl_EnumObjects(
589 LPDIRECTINPUTDEVICE8W iface,
590 LPDIENUMDEVICEOBJECTSCALLBACKW lpCallback,
594 ICOM_THIS(JoystickImpl,iface);
596 device_enumobjects_AtoWcb_data data;
598 data.lpCallBack = lpCallback;
599 data.lpvRef = lpvRef;
601 return JoystickAImpl_EnumObjects((LPDIRECTINPUTDEVICE8A) This, (LPDIENUMDEVICEOBJECTSCALLBACKA) DIEnumDevicesCallbackAtoW, (LPVOID) &data, dwFlags);
604 /******************************************************************************
605 * GetProperty : get input device properties
607 static HRESULT WINAPI JoystickAImpl_GetProperty(LPDIRECTINPUTDEVICE8A iface,
609 LPDIPROPHEADER pdiph)
611 ICOM_THIS(JoystickImpl,iface);
613 TRACE("(this=%p,%s,%p): stub!\n",
614 iface, debugstr_guid(rguid), pdiph);
616 if (TRACE_ON(dinput))
617 _dump_DIPROPHEADER(pdiph);
619 if (!HIWORD(rguid)) {
620 switch ((DWORD)rguid) {
621 case (DWORD) DIPROP_BUFFERSIZE: {
622 LPDIPROPDWORD pd = (LPDIPROPDWORD)pdiph;
624 TRACE(" return buffersize = %d\n",This->queue_len);
625 pd->dwData = This->queue_len;
629 case (DWORD) DIPROP_RANGE: {
630 LPDIPROPRANGE pr = (LPDIPROPRANGE) pdiph;
632 if ((pdiph->dwHow == DIPH_BYID) &&
633 (pdiph->dwObj & DIDFT_ABSAXIS)) {
634 /* The app is querying the current range of the axis : return the lMin and lMax values */
635 pr->lMin = This->lMin;
636 pr->lMax = This->lMax;
643 FIXME("Unknown type %ld (%s)\n",(DWORD)rguid,debugstr_guid(rguid));
652 static ICOM_VTABLE(IDirectInputDevice8A) JoystickAvt =
654 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
655 IDirectInputDevice2AImpl_QueryInterface,
656 IDirectInputDevice2AImpl_AddRef,
657 JoystickAImpl_Release,
658 JoystickAImpl_GetCapabilities,
659 JoystickAImpl_EnumObjects,
660 JoystickAImpl_GetProperty,
661 JoystickAImpl_SetProperty,
662 JoystickAImpl_Acquire,
663 JoystickAImpl_Unacquire,
664 JoystickAImpl_GetDeviceState,
665 JoystickAImpl_GetDeviceData,
666 JoystickAImpl_SetDataFormat,
667 JoystickAImpl_SetEventNotification,
668 IDirectInputDevice2AImpl_SetCooperativeLevel,
669 IDirectInputDevice2AImpl_GetObjectInfo,
670 IDirectInputDevice2AImpl_GetDeviceInfo,
671 IDirectInputDevice2AImpl_RunControlPanel,
672 IDirectInputDevice2AImpl_Initialize,
673 IDirectInputDevice2AImpl_CreateEffect,
674 IDirectInputDevice2AImpl_EnumEffects,
675 IDirectInputDevice2AImpl_GetEffectInfo,
676 IDirectInputDevice2AImpl_GetForceFeedbackState,
677 IDirectInputDevice2AImpl_SendForceFeedbackCommand,
678 IDirectInputDevice2AImpl_EnumCreatedEffectObjects,
679 IDirectInputDevice2AImpl_Escape,
681 IDirectInputDevice2AImpl_SendDeviceData,
682 IDirectInputDevice7AImpl_EnumEffectsInFile,
683 IDirectInputDevice7AImpl_WriteEffectToFile,
684 IDirectInputDevice8AImpl_BuildActionMap,
685 IDirectInputDevice8AImpl_SetActionMap,
686 IDirectInputDevice8AImpl_GetImageInfo
689 #if !defined(__STRICT_ANSI__) && defined(__GNUC__)
690 # define XCAST(fun) (typeof(SysJoystickWvt.fun))
692 # define XCAST(fun) (void*)
695 static ICOM_VTABLE(IDirectInputDevice8W) SysJoystickWvt =
697 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
698 IDirectInputDevice2WImpl_QueryInterface,
699 XCAST(AddRef)IDirectInputDevice2AImpl_AddRef,
700 XCAST(Release)JoystickAImpl_Release,
701 XCAST(GetCapabilities)JoystickAImpl_GetCapabilities,
702 JoystickWImpl_EnumObjects,
703 XCAST(GetProperty)JoystickAImpl_GetProperty,
704 XCAST(SetProperty)JoystickAImpl_SetProperty,
705 XCAST(Acquire)JoystickAImpl_Acquire,
706 XCAST(Unacquire)JoystickAImpl_Unacquire,
707 XCAST(GetDeviceState)JoystickAImpl_GetDeviceState,
708 XCAST(GetDeviceData)JoystickAImpl_GetDeviceData,
709 XCAST(SetDataFormat)JoystickAImpl_SetDataFormat,
710 XCAST(SetEventNotification)JoystickAImpl_SetEventNotification,
711 XCAST(SetCooperativeLevel)IDirectInputDevice2AImpl_SetCooperativeLevel,
712 IDirectInputDevice2WImpl_GetObjectInfo,
713 IDirectInputDevice2WImpl_GetDeviceInfo,
714 XCAST(RunControlPanel)IDirectInputDevice2AImpl_RunControlPanel,
715 XCAST(Initialize)IDirectInputDevice2AImpl_Initialize,
716 XCAST(CreateEffect)IDirectInputDevice2AImpl_CreateEffect,
717 IDirectInputDevice2WImpl_EnumEffects,
718 IDirectInputDevice2WImpl_GetEffectInfo,
719 XCAST(GetForceFeedbackState)IDirectInputDevice2AImpl_GetForceFeedbackState,
720 XCAST(SendForceFeedbackCommand)IDirectInputDevice2AImpl_SendForceFeedbackCommand,
721 XCAST(EnumCreatedEffectObjects)IDirectInputDevice2AImpl_EnumCreatedEffectObjects,
722 XCAST(Escape)IDirectInputDevice2AImpl_Escape,
723 XCAST(Poll)JoystickAImpl_Poll,
724 XCAST(SendDeviceData)IDirectInputDevice2AImpl_SendDeviceData,
725 IDirectInputDevice7WImpl_EnumEffectsInFile,
726 IDirectInputDevice7WImpl_WriteEffectToFile,
727 IDirectInputDevice8WImpl_BuildActionMap,
728 IDirectInputDevice8WImpl_SetActionMap,
729 IDirectInputDevice8WImpl_GetImageInfo
733 #endif /* HAVE_LINUX_22_JOYSTICK_API */