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 */
114 lpddi->dwDevType = DIDEVTYPE_JOYSTICK |
115 (DIDEVTYPEJOYSTICK_TRADITIONAL<<8);
116 strcpy(lpddi->tszInstanceName, "Joystick");
117 /* ioctl JSIOCGNAME(len) */
118 strcpy(lpddi->tszProductName, "Wine Joystick");
120 lpddi->guidFFDriver = GUID_NULL;
130 static BOOL joydev_enum_deviceW(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINSTANCEW lpddi, int version)
134 if (dwFlags & DIEDFL_FORCEFEEDBACK)
137 if ((dwDevType==0) || (GET_DIDEVICE_TYPE(dwDevType)==DIDEVTYPE_JOYSTICK)) {
138 /* check whether we have a joystick */
139 if ((fd = open(JOYDEV,O_RDONLY) != -1) || (errno!=ENODEV && errno!=ENOENT)) {
140 TRACE("Enumerating the linux Joystick device\n");
142 /* Return joystick */
143 lpddi->guidInstance = GUID_Joystick;
144 lpddi->guidProduct = DInput_Wine_Joystick_GUID;
145 /* we only support traditional joysticks for now */
146 lpddi->dwDevType = DIDEVTYPE_JOYSTICK |
147 (DIDEVTYPEJOYSTICK_TRADITIONAL<<8);
149 MultiByteToWideChar(CP_ACP, 0, "Joystick", -1, lpddi->tszInstanceName, MAX_PATH);
150 /* ioctl JSIOCGNAME(len) */
151 MultiByteToWideChar(CP_ACP, 0, "Wine Joystick", -1, lpddi->tszProductName, MAX_PATH);
152 lpddi->guidFFDriver = GUID_NULL;
162 static JoystickImpl *alloc_device(REFGUID rguid, LPVOID jvt, IDirectInputImpl *dinput)
164 JoystickImpl* newDevice;
166 newDevice = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(JoystickImpl));
167 newDevice->lpVtbl = jvt;
169 newDevice->joyfd = -1;
170 newDevice->lMin = -32768;
171 newDevice->lMax = +32767;
172 newDevice->dinput = dinput;
173 memcpy(&(newDevice->guid),rguid,sizeof(*rguid));
178 static HRESULT joydev_create_deviceA(IDirectInputImpl *dinput, REFGUID rguid, REFIID riid, LPDIRECTINPUTDEVICEA* pdev)
180 if ((IsEqualGUID(&GUID_Joystick,rguid)) ||
181 (IsEqualGUID(&DInput_Wine_Joystick_GUID,rguid))) {
182 if ((riid == NULL) ||
183 IsEqualGUID(&IID_IDirectInputDeviceA,riid) ||
184 IsEqualGUID(&IID_IDirectInputDevice2A,riid) ||
185 IsEqualGUID(&IID_IDirectInputDevice7A,riid) ||
186 IsEqualGUID(&IID_IDirectInputDevice8A,riid)) {
187 *pdev=(IDirectInputDeviceA*) alloc_device(rguid, &JoystickAvt, dinput);
189 TRACE("Creating a Joystick device (%p)\n", *pdev);
192 return DIERR_NOINTERFACE;
195 return DIERR_DEVICENOTREG;
198 static HRESULT joydev_create_deviceW(IDirectInputImpl *dinput, REFGUID rguid, REFIID riid, LPDIRECTINPUTDEVICEW* pdev)
200 if ((IsEqualGUID(&GUID_Joystick,rguid)) ||
201 (IsEqualGUID(&DInput_Wine_Joystick_GUID,rguid))) {
202 if ((riid == NULL) ||
203 IsEqualGUID(&IID_IDirectInputDeviceW,riid) ||
204 IsEqualGUID(&IID_IDirectInputDevice2W,riid) ||
205 IsEqualGUID(&IID_IDirectInputDevice7W,riid) ||
206 IsEqualGUID(&IID_IDirectInputDevice8W,riid)) {
207 *pdev = (IDirectInputDeviceW*) alloc_device(rguid, &JoystickWvt, dinput);
209 TRACE("Creating a Joystick device (%p)\n", *pdev);
212 return DIERR_NOINTERFACE;
215 return DIERR_DEVICENOTREG;
218 static dinput_device joydev = {
222 joydev_create_deviceA,
223 joydev_create_deviceW
226 DECL_GLOBAL_CONSTRUCTOR(joydev_register) { dinput_register_device(&joydev); }
228 /******************************************************************************
231 static ULONG WINAPI JoystickAImpl_Release(LPDIRECTINPUTDEVICE8A iface)
233 ICOM_THIS(JoystickImpl,iface);
239 /* Free the data queue */
240 if (This->data_queue != NULL)
241 HeapFree(GetProcessHeap(),0,This->data_queue);
243 /* Free the DataFormat */
244 HeapFree(GetProcessHeap(), 0, This->df);
246 HeapFree(GetProcessHeap(),0,This);
250 /******************************************************************************
251 * SetDataFormat : the application can choose the format of the data
252 * the device driver sends back with GetDeviceState.
254 static HRESULT WINAPI JoystickAImpl_SetDataFormat(
255 LPDIRECTINPUTDEVICE8A iface,LPCDIDATAFORMAT df
258 ICOM_THIS(JoystickImpl,iface);
261 TRACE("(this=%p,%p)\n",This,df);
263 TRACE("(df.dwSize=%ld)\n",df->dwSize);
264 TRACE("(df.dwObjsize=%ld)\n",df->dwObjSize);
265 TRACE("(df.dwFlags=0x%08lx)\n",df->dwFlags);
266 TRACE("(df.dwDataSize=%ld)\n",df->dwDataSize);
267 TRACE("(df.dwNumObjs=%ld)\n",df->dwNumObjs);
269 for (i=0;i<df->dwNumObjs;i++) {
270 TRACE("df.rgodf[%d].guid %s (%p)\n",i,debugstr_guid(df->rgodf[i].pguid), df->rgodf[i].pguid);
271 TRACE("df.rgodf[%d].dwOfs %ld\n",i,df->rgodf[i].dwOfs);
272 TRACE("dwType 0x%02x,dwInstance %d\n",DIDFT_GETTYPE(df->rgodf[i].dwType),DIDFT_GETINSTANCE(df->rgodf[i].dwType));
273 TRACE("df.rgodf[%d].dwFlags 0x%08lx\n",i,df->rgodf[i].dwFlags);
276 /* Store the new data format */
277 This->df = HeapAlloc(GetProcessHeap(),0,df->dwSize);
278 memcpy(This->df, df, df->dwSize);
279 This->df->rgodf = HeapAlloc(GetProcessHeap(),0,df->dwNumObjs*df->dwObjSize);
280 memcpy(This->df->rgodf,df->rgodf,df->dwNumObjs*df->dwObjSize);
285 /******************************************************************************
286 * Acquire : gets exclusive control of the joystick
288 static HRESULT WINAPI JoystickAImpl_Acquire(LPDIRECTINPUTDEVICE8A iface)
290 ICOM_THIS(JoystickImpl,iface);
292 TRACE("(this=%p)\n",This);
295 This->joyfd=open(JOYDEV,O_RDONLY);
297 return DIERR_NOTFOUND;
301 /******************************************************************************
302 * Unacquire : frees the joystick
304 static HRESULT WINAPI JoystickAImpl_Unacquire(LPDIRECTINPUTDEVICE8A iface)
306 ICOM_THIS(JoystickImpl,iface);
308 TRACE("(this=%p)\n",This);
309 if (This->joyfd!=-1) {
318 #define map_axis(val) ((val+32768)*(This->lMax-This->lMin)/65536+This->lMin)
320 static void joy_polldev(JoystickImpl *This) {
328 memset(&tv,0,sizeof(tv));
329 FD_ZERO(&readfds);FD_SET(This->joyfd,&readfds);
330 if (1>select(This->joyfd+1,&readfds,NULL,NULL,&tv))
332 /* we have one event, so we can read */
333 if (sizeof(jse)!=read(This->joyfd,&jse,sizeof(jse))) {
336 TRACE("js_event: type 0x%x, number %d, value %d\n",jse.type,jse.number,jse.value);
337 if (jse.type & JS_EVENT_BUTTON) {
338 GEN_EVENT(DIJOFS_BUTTON(jse.number),jse.value?0x80:0x00,jse.time,(This->dinput->evsequence)++);
339 This->js.rgbButtons[jse.number] = jse.value?0x80:0x00;
341 if (jse.type & JS_EVENT_AXIS) {
342 switch (jse.number) {
344 GEN_EVENT(jse.number*4,jse.value,jse.time,(This->dinput->evsequence)++);
345 This->js.lX = map_axis(jse.value);
348 GEN_EVENT(jse.number*4,jse.value,jse.time,(This->dinput->evsequence)++);
349 This->js.lY = map_axis(jse.value);
352 GEN_EVENT(jse.number*4,jse.value,jse.time,(This->dinput->evsequence)++);
353 This->js.lZ = map_axis(jse.value);
356 FIXME("more than 3 axes (%d) not handled!\n",jse.number);
363 /******************************************************************************
364 * GetDeviceState : returns the "state" of the joystick.
367 static HRESULT WINAPI JoystickAImpl_GetDeviceState(
368 LPDIRECTINPUTDEVICE8A iface,DWORD len,LPVOID ptr
370 ICOM_THIS(JoystickImpl,iface);
373 TRACE("(this=%p,0x%08lx,%p)\n",This,len,ptr);
374 if ((len != sizeof(DIJOYSTATE)) && (len != sizeof(DIJOYSTATE2))) {
375 FIXME("len %ld is not sizeof(DIJOYSTATE), unsupported format.\n",len);
378 memcpy(ptr,&(This->js),len);
379 This->queue_head = 0;
380 This->queue_tail = 0;
384 /******************************************************************************
385 * GetDeviceData : gets buffered input data.
387 static HRESULT WINAPI JoystickAImpl_GetDeviceData(LPDIRECTINPUTDEVICE8A iface,
389 LPDIDEVICEOBJECTDATA dod,
393 ICOM_THIS(JoystickImpl,iface);
395 FIXME("(%p)->(dods=%ld,entries=%ld,fl=0x%08lx),STUB!\n",This,dodsize,*entries,flags);
398 if (flags & DIGDD_PEEK)
399 FIXME("DIGDD_PEEK\n");
407 /******************************************************************************
408 * SetProperty : change input device properties
410 static HRESULT WINAPI JoystickAImpl_SetProperty(LPDIRECTINPUTDEVICE8A iface,
414 ICOM_THIS(JoystickImpl,iface);
416 FIXME("(this=%p,%s,%p)\n",This,debugstr_guid(rguid),ph);
417 FIXME("ph.dwSize = %ld, ph.dwHeaderSize =%ld, ph.dwObj = %ld, ph.dwHow= %ld\n",ph->dwSize, ph->dwHeaderSize,ph->dwObj,ph->dwHow);
419 if (!HIWORD(rguid)) {
420 switch ((DWORD)rguid) {
421 case (DWORD) DIPROP_BUFFERSIZE: {
422 LPCDIPROPDWORD pd = (LPCDIPROPDWORD)ph;
424 FIXME("buffersize = %ld\n",pd->dwData);
427 case (DWORD)DIPROP_RANGE: {
428 LPCDIPROPRANGE pr = (LPCDIPROPRANGE)ph;
430 FIXME("proprange(%ld,%ld)\n",pr->lMin,pr->lMax);
431 This->lMin = pr->lMin;
432 This->lMax = pr->lMax;
435 case (DWORD)DIPROP_DEADZONE: {
436 LPCDIPROPDWORD pd = (LPCDIPROPDWORD)ph;
438 FIXME("deadzone(%ld)\n",pd->dwData);
439 This->deadzone = pd->dwData;
443 FIXME("Unknown type %ld (%s)\n",(DWORD)rguid,debugstr_guid(rguid));
450 /******************************************************************************
451 * SetEventNotification : specifies event to be sent on state change
453 static HRESULT WINAPI JoystickAImpl_SetEventNotification(
454 LPDIRECTINPUTDEVICE8A iface, HANDLE hnd
456 ICOM_THIS(JoystickImpl,iface);
458 TRACE("(this=%p,0x%08lx)\n",This,(DWORD)hnd);
463 static HRESULT WINAPI JoystickAImpl_GetCapabilities(
464 LPDIRECTINPUTDEVICE8A iface,
465 LPDIDEVCAPS lpDIDevCaps)
467 ICOM_THIS(JoystickImpl,iface);
469 int xfd = This->joyfd;
471 TRACE("%p->(%p)\n",iface,lpDIDevCaps);
473 xfd = open(JOYDEV,O_RDONLY);
474 lpDIDevCaps->dwFlags = DIDC_ATTACHED;
475 lpDIDevCaps->dwDevType = DIDEVTYPE_JOYSTICK;
477 if (-1==ioctl(xfd,JSIOCGAXES,&axes))
479 lpDIDevCaps->dwAxes = axes;
482 if (-1==ioctl(xfd,JSIOCGAXES,&buttons))
484 lpDIDevCaps->dwButtons = buttons;
486 if (xfd!=This->joyfd)
490 static HRESULT WINAPI JoystickAImpl_Poll(LPDIRECTINPUTDEVICE8A iface) {
491 ICOM_THIS(JoystickImpl,iface);
498 /******************************************************************************
499 * EnumObjects : enumerate the different buttons and axis...
501 static HRESULT WINAPI JoystickAImpl_EnumObjects(
502 LPDIRECTINPUTDEVICE8A iface,
503 LPDIENUMDEVICEOBJECTSCALLBACKA lpCallback,
507 ICOM_THIS(JoystickImpl,iface);
508 DIDEVICEOBJECTINSTANCEA ddoi;
509 int xfd = This->joyfd;
511 TRACE("(this=%p,%p,%p,%08lx)\n", This, lpCallback, lpvRef, dwFlags);
512 if (TRACE_ON(dinput)) {
513 TRACE(" - flags = ");
514 _dump_EnumObjects_flags(dwFlags);
518 /* Only the fields till dwFFMaxForce are relevant */
519 ddoi.dwSize = FIELD_OFFSET(DIDEVICEOBJECTINSTANCEA, dwFFMaxForce);
521 /* For the joystick, do as is done in the GetCapabilities function */
522 if ((dwFlags == DIDFT_ALL) ||
523 (dwFlags & DIDFT_AXIS)) {
527 if (-1==ioctl(xfd,JSIOCGAXES,&axes))
531 for (i = 0; i < axes; i++) {
534 ddoi.guidType = GUID_XAxis;
535 ddoi.dwOfs = DIJOFS_X;
538 ddoi.guidType = GUID_YAxis;
539 ddoi.dwOfs = DIJOFS_Y;
542 ddoi.guidType = GUID_ZAxis;
543 ddoi.dwOfs = DIJOFS_Z;
546 ddoi.guidType = GUID_Unknown;
547 ddoi.dwOfs = DIJOFS_Z + (i - 2) * sizeof(LONG);
549 ddoi.dwType = DIDFT_MAKEINSTANCE((0x0001 << i) << WINE_JOYSTICK_AXIS_BASE) | DIDFT_ABSAXIS;
550 sprintf(ddoi.tszName, "%d-Axis", i);
551 _dump_OBJECTINSTANCEA(&ddoi);
552 if (lpCallback(&ddoi, lpvRef) != DIENUM_CONTINUE) return DI_OK;
556 if ((dwFlags == DIDFT_ALL) ||
557 (dwFlags & DIDFT_BUTTON)) {
561 if (-1==ioctl(xfd,JSIOCGAXES,&buttons))
565 /* The DInput SDK says that GUID_Button is only for mouse buttons but well... */
566 ddoi.guidType = GUID_Button;
568 for (i = 0; i < buttons; i++) {
569 ddoi.dwOfs = DIJOFS_BUTTON(i);
570 ddoi.dwType = DIDFT_MAKEINSTANCE((0x0001 << i) << WINE_JOYSTICK_BUTTON_BASE) | DIDFT_PSHBUTTON;
571 sprintf(ddoi.tszName, "%d-Button", i);
572 _dump_OBJECTINSTANCEA(&ddoi);
573 if (lpCallback(&ddoi, lpvRef) != DIENUM_CONTINUE) return DI_OK;
577 if (xfd!=This->joyfd)
583 /******************************************************************************
584 * EnumObjects : enumerate the different buttons and axis...
586 static HRESULT WINAPI JoystickWImpl_EnumObjects(
587 LPDIRECTINPUTDEVICE8W iface,
588 LPDIENUMDEVICEOBJECTSCALLBACKW lpCallback,
592 ICOM_THIS(JoystickImpl,iface);
594 device_enumobjects_AtoWcb_data data;
596 data.lpCallBack = lpCallback;
597 data.lpvRef = lpvRef;
599 return JoystickAImpl_EnumObjects((LPDIRECTINPUTDEVICE8A) This, (LPDIENUMDEVICEOBJECTSCALLBACKA) DIEnumDevicesCallbackAtoW, (LPVOID) &data, dwFlags);
602 /******************************************************************************
603 * GetProperty : get input device properties
605 static HRESULT WINAPI JoystickAImpl_GetProperty(LPDIRECTINPUTDEVICE8A iface,
607 LPDIPROPHEADER pdiph)
609 ICOM_THIS(JoystickImpl,iface);
611 TRACE("(this=%p,%s,%p): stub!\n",
612 iface, debugstr_guid(rguid), pdiph);
614 if (TRACE_ON(dinput))
615 _dump_DIPROPHEADER(pdiph);
617 if (!HIWORD(rguid)) {
618 switch ((DWORD)rguid) {
619 case (DWORD) DIPROP_BUFFERSIZE: {
620 LPDIPROPDWORD pd = (LPDIPROPDWORD)pdiph;
622 TRACE(" return buffersize = %d\n",This->queue_len);
623 pd->dwData = This->queue_len;
627 case (DWORD) DIPROP_RANGE: {
628 LPDIPROPRANGE pr = (LPDIPROPRANGE) pdiph;
630 if ((pdiph->dwHow == DIPH_BYID) &&
631 (pdiph->dwObj & DIDFT_ABSAXIS)) {
632 /* The app is querying the current range of the axis : return the lMin and lMax values */
633 pr->lMin = This->lMin;
634 pr->lMax = This->lMax;
641 FIXME("Unknown type %ld (%s)\n",(DWORD)rguid,debugstr_guid(rguid));
650 static ICOM_VTABLE(IDirectInputDevice8A) JoystickAvt =
652 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
653 IDirectInputDevice2AImpl_QueryInterface,
654 IDirectInputDevice2AImpl_AddRef,
655 JoystickAImpl_Release,
656 JoystickAImpl_GetCapabilities,
657 JoystickAImpl_EnumObjects,
658 JoystickAImpl_GetProperty,
659 JoystickAImpl_SetProperty,
660 JoystickAImpl_Acquire,
661 JoystickAImpl_Unacquire,
662 JoystickAImpl_GetDeviceState,
663 JoystickAImpl_GetDeviceData,
664 JoystickAImpl_SetDataFormat,
665 JoystickAImpl_SetEventNotification,
666 IDirectInputDevice2AImpl_SetCooperativeLevel,
667 IDirectInputDevice2AImpl_GetObjectInfo,
668 IDirectInputDevice2AImpl_GetDeviceInfo,
669 IDirectInputDevice2AImpl_RunControlPanel,
670 IDirectInputDevice2AImpl_Initialize,
671 IDirectInputDevice2AImpl_CreateEffect,
672 IDirectInputDevice2AImpl_EnumEffects,
673 IDirectInputDevice2AImpl_GetEffectInfo,
674 IDirectInputDevice2AImpl_GetForceFeedbackState,
675 IDirectInputDevice2AImpl_SendForceFeedbackCommand,
676 IDirectInputDevice2AImpl_EnumCreatedEffectObjects,
677 IDirectInputDevice2AImpl_Escape,
679 IDirectInputDevice2AImpl_SendDeviceData,
680 IDirectInputDevice7AImpl_EnumEffectsInFile,
681 IDirectInputDevice7AImpl_WriteEffectToFile,
682 IDirectInputDevice8AImpl_BuildActionMap,
683 IDirectInputDevice8AImpl_SetActionMap,
684 IDirectInputDevice8AImpl_GetImageInfo
687 #if !defined(__STRICT_ANSI__) && defined(__GNUC__)
688 # define XCAST(fun) (typeof(SysJoystickWvt.fun))
690 # define XCAST(fun) (void*)
693 static ICOM_VTABLE(IDirectInputDevice8W) SysJoystickWvt =
695 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
696 IDirectInputDevice2WImpl_QueryInterface,
697 XCAST(AddRef)IDirectInputDevice2AImpl_AddRef,
698 XCAST(Release)JoystickAImpl_Release,
699 XCAST(GetCapabilities)JoystickAImpl_GetCapabilities,
700 JoystickWImpl_EnumObjects,
701 XCAST(GetProperty)JoystickAImpl_GetProperty,
702 XCAST(SetProperty)JoystickAImpl_SetProperty,
703 XCAST(Acquire)JoystickAImpl_Acquire,
704 XCAST(Unacquire)JoystickAImpl_Unacquire,
705 XCAST(GetDeviceState)JoystickAImpl_GetDeviceState,
706 XCAST(GetDeviceData)JoystickAImpl_GetDeviceData,
707 XCAST(SetDataFormat)JoystickAImpl_SetDataFormat,
708 XCAST(SetEventNotification)JoystickAImpl_SetEventNotification,
709 XCAST(SetCooperativeLevel)IDirectInputDevice2AImpl_SetCooperativeLevel,
710 IDirectInputDevice2WImpl_GetObjectInfo,
711 IDirectInputDevice2WImpl_GetDeviceInfo,
712 XCAST(RunControlPanel)IDirectInputDevice2AImpl_RunControlPanel,
713 XCAST(Initialize)IDirectInputDevice2AImpl_Initialize,
714 XCAST(CreateEffect)IDirectInputDevice2AImpl_CreateEffect,
715 IDirectInputDevice2WImpl_EnumEffects,
716 IDirectInputDevice2WImpl_GetEffectInfo,
717 XCAST(GetForceFeedbackState)IDirectInputDevice2AImpl_GetForceFeedbackState,
718 XCAST(SendForceFeedbackCommand)IDirectInputDevice2AImpl_SendForceFeedbackCommand,
719 XCAST(EnumCreatedEffectObjects)IDirectInputDevice2AImpl_EnumCreatedEffectObjects,
720 XCAST(Escape)IDirectInputDevice2AImpl_Escape,
721 XCAST(Poll)JoystickAImpl_Poll,
722 XCAST(SendDeviceData)IDirectInputDevice2AImpl_SendDeviceData,
723 IDirectInputDevice7WImpl_EnumEffectsInFile,
724 IDirectInputDevice7WImpl_WriteEffectToFile,
725 IDirectInputDevice8WImpl_BuildActionMap,
726 IDirectInputDevice8WImpl_SetActionMap,
727 IDirectInputDevice8WImpl_GetImageInfo
731 #endif /* HAVE_LINUX_22_JOYSTICK_API */