Commit d2d08f0c authored by Ove Kaaven's avatar Ove Kaaven Committed by Alexandre Julliard

- support DirectInput 8 interfaces.

- implemented mouse wheel support.
parent c18a6aa8
...@@ -13125,7 +13125,7 @@ MAKE_DLL_RULES=dlls/Makedll.rules ...@@ -13125,7 +13125,7 @@ MAKE_DLL_RULES=dlls/Makedll.rules
MAKE_PROG_RULES=programs/Makeprog.rules MAKE_PROG_RULES=programs/Makeprog.rules
ac_config_files="$ac_config_files Make.rules dlls/Makedll.rules programs/Makeprog.rules Makefile debugger/Makefile dlls/Makefile dlls/advapi32/Makefile dlls/avicap32/Makefile dlls/avifil32/Makefile dlls/comcat/Makefile dlls/comctl32/Makefile dlls/commdlg/Makefile dlls/crtdll/Makefile dlls/crypt32/Makefile dlls/dciman32/Makefile dlls/ddraw/Makefile dlls/devenum/Makefile dlls/dinput/Makefile dlls/dplay/Makefile dlls/dplayx/Makefile dlls/dsound/Makefile dlls/gdi/Makefile dlls/glu32/Makefile dlls/icmp/Makefile dlls/imagehlp/Makefile dlls/imm32/Makefile dlls/kernel/Makefile dlls/lzexpand/Makefile dlls/mapi32/Makefile dlls/mpr/Makefile dlls/msacm/Makefile dlls/msacm/imaadp32/Makefile dlls/msacm/msadp32/Makefile dlls/msacm/msg711/Makefile dlls/msacm/winemp3/Makefile dlls/msdmo/Makefile dlls/msimg32/Makefile dlls/msisys/Makefile dlls/msnet32/Makefile dlls/msrle32/Makefile dlls/msvcrt/Makefile dlls/msvcrt20/Makefile dlls/msvideo/Makefile dlls/netapi32/Makefile dlls/ntdll/Makefile dlls/odbc32/Makefile dlls/ole32/Makefile dlls/oleaut32/Makefile dlls/olecli/Makefile dlls/oledlg/Makefile dlls/olepro32/Makefile dlls/olesvr/Makefile dlls/opengl32/Makefile dlls/psapi/Makefile dlls/qcap/Makefile dlls/quartz/Makefile dlls/rasapi32/Makefile dlls/richedit/Makefile dlls/rpcrt4/Makefile dlls/serialui/Makefile dlls/setupapi/Makefile dlls/shdocvw/Makefile dlls/shell32/Makefile dlls/shfolder/Makefile dlls/shlwapi/Makefile dlls/snmpapi/Makefile dlls/sti/Makefile dlls/tapi32/Makefile dlls/ttydrv/Makefile dlls/twain/Makefile dlls/url/Makefile dlls/urlmon/Makefile dlls/user/Makefile dlls/version/Makefile dlls/win32s/Makefile dlls/winaspi/Makefile dlls/winedos/Makefile dlls/wineps/Makefile dlls/wininet/Makefile dlls/winmm/Makefile dlls/winmm/joystick/Makefile dlls/winmm/mcianim/Makefile dlls/winmm/mciavi/Makefile dlls/winmm/mcicda/Makefile dlls/winmm/mciseq/Makefile dlls/winmm/mciwave/Makefile dlls/winmm/midimap/Makefile dlls/winmm/wavemap/Makefile dlls/winmm/winearts/Makefile dlls/winmm/wineoss/Makefile dlls/winnls/Makefile dlls/winsock/Makefile dlls/winspool/Makefile dlls/wintrust/Makefile dlls/wow32/Makefile dlls/wsock32/Makefile dlls/x11drv/Makefile documentation/Makefile include/Makefile library/Makefile miscemu/Makefile ole/Makefile programs/Makefile programs/avitools/Makefile programs/clock/Makefile programs/cmdlgtst/Makefile programs/control/Makefile programs/expand/Makefile programs/notepad/Makefile programs/osversioncheck/Makefile programs/progman/Makefile programs/regapi/Makefile programs/regedit/Makefile programs/regsvr32/Makefile programs/regtest/Makefile programs/uninstaller/Makefile programs/view/Makefile programs/wcmd/Makefile programs/wineconsole/Makefile programs/winefile/Makefile programs/winemine/Makefile programs/winepath/Makefile programs/winetest/Makefile programs/winhelp/Makefile programs/winver/Makefile server/Makefile tools/Makefile tools/winapi/Makefile tools/winebuild/Makefile tools/winedump/Makefile tools/wmc/Makefile tools/wrc/Makefile tsx11/Makefile unicode/Makefile" ac_config_files="$ac_config_files Make.rules dlls/Makedll.rules programs/Makeprog.rules Makefile debugger/Makefile dlls/Makefile dlls/advapi32/Makefile dlls/avicap32/Makefile dlls/avifil32/Makefile dlls/comcat/Makefile dlls/comctl32/Makefile dlls/commdlg/Makefile dlls/crtdll/Makefile dlls/crypt32/Makefile dlls/dciman32/Makefile dlls/ddraw/Makefile dlls/devenum/Makefile dlls/dinput/Makefile dlls/dinput8/Makefile dlls/dplay/Makefile dlls/dplayx/Makefile dlls/dsound/Makefile dlls/gdi/Makefile dlls/glu32/Makefile dlls/icmp/Makefile dlls/imagehlp/Makefile dlls/imm32/Makefile dlls/kernel/Makefile dlls/lzexpand/Makefile dlls/mapi32/Makefile dlls/mpr/Makefile dlls/msacm/Makefile dlls/msacm/imaadp32/Makefile dlls/msacm/msadp32/Makefile dlls/msacm/msg711/Makefile dlls/msacm/winemp3/Makefile dlls/msdmo/Makefile dlls/msimg32/Makefile dlls/msisys/Makefile dlls/msnet32/Makefile dlls/msrle32/Makefile dlls/msvcrt/Makefile dlls/msvcrt20/Makefile dlls/msvideo/Makefile dlls/netapi32/Makefile dlls/ntdll/Makefile dlls/odbc32/Makefile dlls/ole32/Makefile dlls/oleaut32/Makefile dlls/olecli/Makefile dlls/oledlg/Makefile dlls/olepro32/Makefile dlls/olesvr/Makefile dlls/opengl32/Makefile dlls/psapi/Makefile dlls/qcap/Makefile dlls/quartz/Makefile dlls/rasapi32/Makefile dlls/richedit/Makefile dlls/rpcrt4/Makefile dlls/serialui/Makefile dlls/setupapi/Makefile dlls/shdocvw/Makefile dlls/shell32/Makefile dlls/shfolder/Makefile dlls/shlwapi/Makefile dlls/snmpapi/Makefile dlls/sti/Makefile dlls/tapi32/Makefile dlls/ttydrv/Makefile dlls/twain/Makefile dlls/url/Makefile dlls/urlmon/Makefile dlls/user/Makefile dlls/version/Makefile dlls/win32s/Makefile dlls/winaspi/Makefile dlls/winedos/Makefile dlls/wineps/Makefile dlls/wininet/Makefile dlls/winmm/Makefile dlls/winmm/joystick/Makefile dlls/winmm/mcianim/Makefile dlls/winmm/mciavi/Makefile dlls/winmm/mcicda/Makefile dlls/winmm/mciseq/Makefile dlls/winmm/mciwave/Makefile dlls/winmm/midimap/Makefile dlls/winmm/wavemap/Makefile dlls/winmm/winearts/Makefile dlls/winmm/wineoss/Makefile dlls/winnls/Makefile dlls/winsock/Makefile dlls/winspool/Makefile dlls/wintrust/Makefile dlls/wow32/Makefile dlls/wsock32/Makefile dlls/x11drv/Makefile documentation/Makefile include/Makefile library/Makefile miscemu/Makefile ole/Makefile programs/Makefile programs/avitools/Makefile programs/clock/Makefile programs/cmdlgtst/Makefile programs/control/Makefile programs/expand/Makefile programs/notepad/Makefile programs/osversioncheck/Makefile programs/progman/Makefile programs/regapi/Makefile programs/regedit/Makefile programs/regsvr32/Makefile programs/regtest/Makefile programs/uninstaller/Makefile programs/view/Makefile programs/wcmd/Makefile programs/wineconsole/Makefile programs/winefile/Makefile programs/winemine/Makefile programs/winepath/Makefile programs/winetest/Makefile programs/winhelp/Makefile programs/winver/Makefile server/Makefile tools/Makefile tools/winapi/Makefile tools/winebuild/Makefile tools/winedump/Makefile tools/wmc/Makefile tools/wrc/Makefile tsx11/Makefile unicode/Makefile"
cat >confcache <<\_ACEOF cat >confcache <<\_ACEOF
...@@ -13620,6 +13620,7 @@ do ...@@ -13620,6 +13620,7 @@ do
"dlls/ddraw/Makefile" ) CONFIG_FILES="$CONFIG_FILES dlls/ddraw/Makefile" ;; "dlls/ddraw/Makefile" ) CONFIG_FILES="$CONFIG_FILES dlls/ddraw/Makefile" ;;
"dlls/devenum/Makefile" ) CONFIG_FILES="$CONFIG_FILES dlls/devenum/Makefile" ;; "dlls/devenum/Makefile" ) CONFIG_FILES="$CONFIG_FILES dlls/devenum/Makefile" ;;
"dlls/dinput/Makefile" ) CONFIG_FILES="$CONFIG_FILES dlls/dinput/Makefile" ;; "dlls/dinput/Makefile" ) CONFIG_FILES="$CONFIG_FILES dlls/dinput/Makefile" ;;
"dlls/dinput8/Makefile" ) CONFIG_FILES="$CONFIG_FILES dlls/dinput8/Makefile" ;;
"dlls/dplay/Makefile" ) CONFIG_FILES="$CONFIG_FILES dlls/dplay/Makefile" ;; "dlls/dplay/Makefile" ) CONFIG_FILES="$CONFIG_FILES dlls/dplay/Makefile" ;;
"dlls/dplayx/Makefile" ) CONFIG_FILES="$CONFIG_FILES dlls/dplayx/Makefile" ;; "dlls/dplayx/Makefile" ) CONFIG_FILES="$CONFIG_FILES dlls/dplayx/Makefile" ;;
"dlls/dsound/Makefile" ) CONFIG_FILES="$CONFIG_FILES dlls/dsound/Makefile" ;; "dlls/dsound/Makefile" ) CONFIG_FILES="$CONFIG_FILES dlls/dsound/Makefile" ;;
......
...@@ -1247,6 +1247,7 @@ dlls/dciman32/Makefile ...@@ -1247,6 +1247,7 @@ dlls/dciman32/Makefile
dlls/ddraw/Makefile dlls/ddraw/Makefile
dlls/devenum/Makefile dlls/devenum/Makefile
dlls/dinput/Makefile dlls/dinput/Makefile
dlls/dinput8/Makefile
dlls/dplay/Makefile dlls/dplay/Makefile
dlls/dplayx/Makefile dlls/dplayx/Makefile
dlls/dsound/Makefile dlls/dsound/Makefile
......
...@@ -26,6 +26,7 @@ BASEDIRS = \ ...@@ -26,6 +26,7 @@ BASEDIRS = \
dciman32 \ dciman32 \
devenum \ devenum \
dinput \ dinput \
dinput8 \
dplay \ dplay \
dplayx \ dplayx \
dsound \ dsound \
...@@ -134,6 +135,7 @@ all: \ ...@@ -134,6 +135,7 @@ all: \
ddeml.dll$(DLLEXT) \ ddeml.dll$(DLLEXT) \
devenum.dll$(DLLEXT) \ devenum.dll$(DLLEXT) \
dinput.dll$(DLLEXT) \ dinput.dll$(DLLEXT) \
dinput8.dll$(DLLEXT) \
dispdib.dll$(DLLEXT) \ dispdib.dll$(DLLEXT) \
display.dll$(DLLEXT) \ display.dll$(DLLEXT) \
dplay.dll$(DLLEXT) \ dplay.dll$(DLLEXT) \
...@@ -289,6 +291,9 @@ devenum.dll$(DLLEXT): devenum/devenum.dll$(DLLEXT) ...@@ -289,6 +291,9 @@ devenum.dll$(DLLEXT): devenum/devenum.dll$(DLLEXT)
dinput.dll$(DLLEXT): dinput/dinput.dll$(DLLEXT) dinput.dll$(DLLEXT): dinput/dinput.dll$(DLLEXT)
$(RM) $@ && $(LN_S) dinput/dinput.dll$(DLLEXT) $@ $(RM) $@ && $(LN_S) dinput/dinput.dll$(DLLEXT) $@
dinput8.dll$(DLLEXT): dinput8/dinput8.dll$(DLLEXT)
$(RM) $@ && $(LN_S) dinput8/dinput8.dll$(DLLEXT) $@
dplay.dll$(DLLEXT): dplay/dplay.dll$(DLLEXT) dplay.dll$(DLLEXT): dplay/dplay.dll$(DLLEXT)
$(RM) $@ && $(LN_S) dplay/dplay.dll$(DLLEXT) $@ $(RM) $@ && $(LN_S) dplay/dplay.dll$(DLLEXT) $@
...@@ -546,6 +551,7 @@ dciman32/dciman32.dll$(DLLEXT): dciman32 ...@@ -546,6 +551,7 @@ dciman32/dciman32.dll$(DLLEXT): dciman32
ddraw/ddraw.dll$(DLLEXT): ddraw ddraw/ddraw.dll$(DLLEXT): ddraw
devenum/devenum.dll$(DLLEXT): devenum devenum/devenum.dll$(DLLEXT): devenum
dinput/dinput.dll$(DLLEXT): dinput dinput/dinput.dll$(DLLEXT): dinput
dinput8/dinput8.dll$(DLLEXT): dinput8
dplay/dplay.dll$(DLLEXT): dplay dplay/dplay.dll$(DLLEXT): dplay
dplayx/dplayx.dll$(DLLEXT): dplayx dplayx/dplayx.dll$(DLLEXT): dplayx
dsound/dsound.dll$(DLLEXT): dsound dsound/dsound.dll$(DLLEXT): dsound
...@@ -642,6 +648,7 @@ dciman32: kernel32.dll$(DLLEXT) ...@@ -642,6 +648,7 @@ dciman32: kernel32.dll$(DLLEXT)
ddraw: user32.dll$(DLLEXT) gdi32.dll$(DLLEXT) kernel32.dll$(DLLEXT) libuser32.dll.$(LIBEXT) \ ddraw: user32.dll$(DLLEXT) gdi32.dll$(DLLEXT) kernel32.dll$(DLLEXT) libuser32.dll.$(LIBEXT) \
libgdi32.dll.$(LIBEXT) libkernel32.dll.$(LIBEXT) libgdi32.dll.$(LIBEXT) libkernel32.dll.$(LIBEXT)
devenum: kernel32.dll$(DLLEXT) devenum: kernel32.dll$(DLLEXT)
dinput8: dinput.dll$(DLLEXT)
dinput: user32.dll$(DLLEXT) kernel32.dll$(DLLEXT) dinput: user32.dll$(DLLEXT) kernel32.dll$(DLLEXT)
dplay: dplayx.dll$(DLLEXT) dplay: dplayx.dll$(DLLEXT)
dplayx: winmm.dll$(DLLEXT) ole32.dll$(DLLEXT) user32.dll$(DLLEXT) advapi32.dll$(DLLEXT) \ dplayx: winmm.dll$(DLLEXT) ole32.dll$(DLLEXT) user32.dll$(DLLEXT) advapi32.dll$(DLLEXT) \
......
...@@ -272,7 +272,7 @@ DataFormat *create_DataFormat(DIDATAFORMAT *wine_format, LPCDIDATAFORMAT asked_f ...@@ -272,7 +272,7 @@ DataFormat *create_DataFormat(DIDATAFORMAT *wine_format, LPCDIDATAFORMAT asked_f
*/ */
HRESULT WINAPI IDirectInputDevice2AImpl_SetDataFormat( HRESULT WINAPI IDirectInputDevice2AImpl_SetDataFormat(
LPDIRECTINPUTDEVICE2A iface,LPCDIDATAFORMAT df LPDIRECTINPUTDEVICE8A iface,LPCDIDATAFORMAT df
) { ) {
int i; int i;
ICOM_THIS(IDirectInputDevice2AImpl,iface); ICOM_THIS(IDirectInputDevice2AImpl,iface);
...@@ -295,7 +295,7 @@ HRESULT WINAPI IDirectInputDevice2AImpl_SetDataFormat( ...@@ -295,7 +295,7 @@ HRESULT WINAPI IDirectInputDevice2AImpl_SetDataFormat(
} }
HRESULT WINAPI IDirectInputDevice2AImpl_SetCooperativeLevel( HRESULT WINAPI IDirectInputDevice2AImpl_SetCooperativeLevel(
LPDIRECTINPUTDEVICE2A iface,HWND hwnd,DWORD dwflags LPDIRECTINPUTDEVICE8A iface,HWND hwnd,DWORD dwflags
) { ) {
ICOM_THIS(IDirectInputDevice2AImpl,iface); ICOM_THIS(IDirectInputDevice2AImpl,iface);
TRACE("(this=%p,0x%08lx,0x%08lx)\n",This,(DWORD)hwnd,dwflags); TRACE("(this=%p,0x%08lx,0x%08lx)\n",This,(DWORD)hwnd,dwflags);
...@@ -305,14 +305,14 @@ HRESULT WINAPI IDirectInputDevice2AImpl_SetCooperativeLevel( ...@@ -305,14 +305,14 @@ HRESULT WINAPI IDirectInputDevice2AImpl_SetCooperativeLevel(
} }
HRESULT WINAPI IDirectInputDevice2AImpl_SetEventNotification( HRESULT WINAPI IDirectInputDevice2AImpl_SetEventNotification(
LPDIRECTINPUTDEVICE2A iface,HANDLE hnd LPDIRECTINPUTDEVICE8A iface,HANDLE hnd
) { ) {
ICOM_THIS(IDirectInputDevice2AImpl,iface); ICOM_THIS(IDirectInputDevice2AImpl,iface);
FIXME("(this=%p,0x%08lx): stub\n",This,(DWORD)hnd); FIXME("(this=%p,0x%08lx): stub\n",This,(DWORD)hnd);
return 0; return 0;
} }
ULONG WINAPI IDirectInputDevice2AImpl_Release(LPDIRECTINPUTDEVICE2A iface) ULONG WINAPI IDirectInputDevice2AImpl_Release(LPDIRECTINPUTDEVICE8A iface)
{ {
ICOM_THIS(IDirectInputDevice2AImpl,iface); ICOM_THIS(IDirectInputDevice2AImpl,iface);
This->ref--; This->ref--;
...@@ -323,7 +323,7 @@ ULONG WINAPI IDirectInputDevice2AImpl_Release(LPDIRECTINPUTDEVICE2A iface) ...@@ -323,7 +323,7 @@ ULONG WINAPI IDirectInputDevice2AImpl_Release(LPDIRECTINPUTDEVICE2A iface)
} }
HRESULT WINAPI IDirectInputDevice2AImpl_QueryInterface( HRESULT WINAPI IDirectInputDevice2AImpl_QueryInterface(
LPDIRECTINPUTDEVICE2A iface,REFIID riid,LPVOID *ppobj LPDIRECTINPUTDEVICE8A iface,REFIID riid,LPVOID *ppobj
) )
{ {
ICOM_THIS(IDirectInputDevice2AImpl,iface); ICOM_THIS(IDirectInputDevice2AImpl,iface);
...@@ -349,14 +349,14 @@ HRESULT WINAPI IDirectInputDevice2AImpl_QueryInterface( ...@@ -349,14 +349,14 @@ HRESULT WINAPI IDirectInputDevice2AImpl_QueryInterface(
} }
ULONG WINAPI IDirectInputDevice2AImpl_AddRef( ULONG WINAPI IDirectInputDevice2AImpl_AddRef(
LPDIRECTINPUTDEVICE2A iface) LPDIRECTINPUTDEVICE8A iface)
{ {
ICOM_THIS(IDirectInputDevice2AImpl,iface); ICOM_THIS(IDirectInputDevice2AImpl,iface);
return ++This->ref; return ++This->ref;
} }
HRESULT WINAPI IDirectInputDevice2AImpl_EnumObjects( HRESULT WINAPI IDirectInputDevice2AImpl_EnumObjects(
LPDIRECTINPUTDEVICE2A iface, LPDIRECTINPUTDEVICE8A iface,
LPDIENUMDEVICEOBJECTSCALLBACKA lpCallback, LPDIENUMDEVICEOBJECTSCALLBACKA lpCallback,
LPVOID lpvRef, LPVOID lpvRef,
DWORD dwFlags) DWORD dwFlags)
...@@ -372,7 +372,7 @@ HRESULT WINAPI IDirectInputDevice2AImpl_EnumObjects( ...@@ -372,7 +372,7 @@ HRESULT WINAPI IDirectInputDevice2AImpl_EnumObjects(
} }
HRESULT WINAPI IDirectInputDevice2AImpl_GetProperty( HRESULT WINAPI IDirectInputDevice2AImpl_GetProperty(
LPDIRECTINPUTDEVICE2A iface, LPDIRECTINPUTDEVICE8A iface,
REFGUID rguid, REFGUID rguid,
LPDIPROPHEADER pdiph) LPDIPROPHEADER pdiph)
{ {
...@@ -386,7 +386,7 @@ HRESULT WINAPI IDirectInputDevice2AImpl_GetProperty( ...@@ -386,7 +386,7 @@ HRESULT WINAPI IDirectInputDevice2AImpl_GetProperty(
} }
HRESULT WINAPI IDirectInputDevice2AImpl_GetObjectInfo( HRESULT WINAPI IDirectInputDevice2AImpl_GetObjectInfo(
LPDIRECTINPUTDEVICE2A iface, LPDIRECTINPUTDEVICE8A iface,
LPDIDEVICEOBJECTINSTANCEA pdidoi, LPDIDEVICEOBJECTINSTANCEA pdidoi,
DWORD dwObj, DWORD dwObj,
DWORD dwHow) DWORD dwHow)
...@@ -398,7 +398,7 @@ HRESULT WINAPI IDirectInputDevice2AImpl_GetObjectInfo( ...@@ -398,7 +398,7 @@ HRESULT WINAPI IDirectInputDevice2AImpl_GetObjectInfo(
} }
HRESULT WINAPI IDirectInputDevice2AImpl_GetDeviceInfo( HRESULT WINAPI IDirectInputDevice2AImpl_GetDeviceInfo(
LPDIRECTINPUTDEVICE2A iface, LPDIRECTINPUTDEVICE8A iface,
LPDIDEVICEINSTANCEA pdidi) LPDIDEVICEINSTANCEA pdidi)
{ {
FIXME("(this=%p,%p): stub!\n", FIXME("(this=%p,%p): stub!\n",
...@@ -408,7 +408,7 @@ HRESULT WINAPI IDirectInputDevice2AImpl_GetDeviceInfo( ...@@ -408,7 +408,7 @@ HRESULT WINAPI IDirectInputDevice2AImpl_GetDeviceInfo(
} }
HRESULT WINAPI IDirectInputDevice2AImpl_RunControlPanel( HRESULT WINAPI IDirectInputDevice2AImpl_RunControlPanel(
LPDIRECTINPUTDEVICE2A iface, LPDIRECTINPUTDEVICE8A iface,
HWND hwndOwner, HWND hwndOwner,
DWORD dwFlags) DWORD dwFlags)
{ {
...@@ -419,7 +419,7 @@ HRESULT WINAPI IDirectInputDevice2AImpl_RunControlPanel( ...@@ -419,7 +419,7 @@ HRESULT WINAPI IDirectInputDevice2AImpl_RunControlPanel(
} }
HRESULT WINAPI IDirectInputDevice2AImpl_Initialize( HRESULT WINAPI IDirectInputDevice2AImpl_Initialize(
LPDIRECTINPUTDEVICE2A iface, LPDIRECTINPUTDEVICE8A iface,
HINSTANCE hinst, HINSTANCE hinst,
DWORD dwVersion, DWORD dwVersion,
REFGUID rguid) REFGUID rguid)
...@@ -434,7 +434,7 @@ HRESULT WINAPI IDirectInputDevice2AImpl_Initialize( ...@@ -434,7 +434,7 @@ HRESULT WINAPI IDirectInputDevice2AImpl_Initialize(
*/ */
HRESULT WINAPI IDirectInputDevice2AImpl_CreateEffect( HRESULT WINAPI IDirectInputDevice2AImpl_CreateEffect(
LPDIRECTINPUTDEVICE2A iface, LPDIRECTINPUTDEVICE8A iface,
REFGUID rguid, REFGUID rguid,
LPCDIEFFECT lpeff, LPCDIEFFECT lpeff,
LPDIRECTINPUTEFFECT *ppdef, LPDIRECTINPUTEFFECT *ppdef,
...@@ -446,7 +446,7 @@ HRESULT WINAPI IDirectInputDevice2AImpl_CreateEffect( ...@@ -446,7 +446,7 @@ HRESULT WINAPI IDirectInputDevice2AImpl_CreateEffect(
} }
HRESULT WINAPI IDirectInputDevice2AImpl_EnumEffects( HRESULT WINAPI IDirectInputDevice2AImpl_EnumEffects(
LPDIRECTINPUTDEVICE2A iface, LPDIRECTINPUTDEVICE8A iface,
LPDIENUMEFFECTSCALLBACKA lpCallback, LPDIENUMEFFECTSCALLBACKA lpCallback,
LPVOID lpvRef, LPVOID lpvRef,
DWORD dwFlags) DWORD dwFlags)
...@@ -460,7 +460,7 @@ HRESULT WINAPI IDirectInputDevice2AImpl_EnumEffects( ...@@ -460,7 +460,7 @@ HRESULT WINAPI IDirectInputDevice2AImpl_EnumEffects(
} }
HRESULT WINAPI IDirectInputDevice2AImpl_GetEffectInfo( HRESULT WINAPI IDirectInputDevice2AImpl_GetEffectInfo(
LPDIRECTINPUTDEVICE2A iface, LPDIRECTINPUTDEVICE8A iface,
LPDIEFFECTINFOA lpdei, LPDIEFFECTINFOA lpdei,
REFGUID rguid) REFGUID rguid)
{ {
...@@ -470,7 +470,7 @@ HRESULT WINAPI IDirectInputDevice2AImpl_GetEffectInfo( ...@@ -470,7 +470,7 @@ HRESULT WINAPI IDirectInputDevice2AImpl_GetEffectInfo(
} }
HRESULT WINAPI IDirectInputDevice2AImpl_GetForceFeedbackState( HRESULT WINAPI IDirectInputDevice2AImpl_GetForceFeedbackState(
LPDIRECTINPUTDEVICE2A iface, LPDIRECTINPUTDEVICE8A iface,
LPDWORD pdwOut) LPDWORD pdwOut)
{ {
FIXME("(this=%p,%p): stub!\n", FIXME("(this=%p,%p): stub!\n",
...@@ -479,7 +479,7 @@ HRESULT WINAPI IDirectInputDevice2AImpl_GetForceFeedbackState( ...@@ -479,7 +479,7 @@ HRESULT WINAPI IDirectInputDevice2AImpl_GetForceFeedbackState(
} }
HRESULT WINAPI IDirectInputDevice2AImpl_SendForceFeedbackCommand( HRESULT WINAPI IDirectInputDevice2AImpl_SendForceFeedbackCommand(
LPDIRECTINPUTDEVICE2A iface, LPDIRECTINPUTDEVICE8A iface,
DWORD dwFlags) DWORD dwFlags)
{ {
FIXME("(this=%p,0x%08lx): stub!\n", FIXME("(this=%p,0x%08lx): stub!\n",
...@@ -488,7 +488,7 @@ HRESULT WINAPI IDirectInputDevice2AImpl_SendForceFeedbackCommand( ...@@ -488,7 +488,7 @@ HRESULT WINAPI IDirectInputDevice2AImpl_SendForceFeedbackCommand(
} }
HRESULT WINAPI IDirectInputDevice2AImpl_EnumCreatedEffectObjects( HRESULT WINAPI IDirectInputDevice2AImpl_EnumCreatedEffectObjects(
LPDIRECTINPUTDEVICE2A iface, LPDIRECTINPUTDEVICE8A iface,
LPDIENUMCREATEDEFFECTOBJECTSCALLBACK lpCallback, LPDIENUMCREATEDEFFECTOBJECTSCALLBACK lpCallback,
LPVOID lpvRef, LPVOID lpvRef,
DWORD dwFlags) DWORD dwFlags)
...@@ -501,7 +501,7 @@ HRESULT WINAPI IDirectInputDevice2AImpl_EnumCreatedEffectObjects( ...@@ -501,7 +501,7 @@ HRESULT WINAPI IDirectInputDevice2AImpl_EnumCreatedEffectObjects(
} }
HRESULT WINAPI IDirectInputDevice2AImpl_Escape( HRESULT WINAPI IDirectInputDevice2AImpl_Escape(
LPDIRECTINPUTDEVICE2A iface, LPDIRECTINPUTDEVICE8A iface,
LPDIEFFESCAPE lpDIEEsc) LPDIEFFESCAPE lpDIEEsc)
{ {
FIXME("(this=%p,%p): stub!\n", FIXME("(this=%p,%p): stub!\n",
...@@ -510,16 +510,16 @@ HRESULT WINAPI IDirectInputDevice2AImpl_Escape( ...@@ -510,16 +510,16 @@ HRESULT WINAPI IDirectInputDevice2AImpl_Escape(
} }
HRESULT WINAPI IDirectInputDevice2AImpl_Poll( HRESULT WINAPI IDirectInputDevice2AImpl_Poll(
LPDIRECTINPUTDEVICE2A iface) LPDIRECTINPUTDEVICE8A iface)
{ {
/* Because wine devices do not need to be polled, just return DI_NOEFFECT */ /* Because wine devices do not need to be polled, just return DI_NOEFFECT */
return DI_NOEFFECT; return DI_NOEFFECT;
} }
HRESULT WINAPI IDirectInputDevice2AImpl_SendDeviceData( HRESULT WINAPI IDirectInputDevice2AImpl_SendDeviceData(
LPDIRECTINPUTDEVICE2A iface, LPDIRECTINPUTDEVICE8A iface,
DWORD cbObjectData, DWORD cbObjectData,
LPDIDEVICEOBJECTDATA rgdod, LPCDIDEVICEOBJECTDATA rgdod,
LPDWORD pdwInOut, LPDWORD pdwInOut,
DWORD dwFlags) DWORD dwFlags)
{ {
...@@ -529,7 +529,7 @@ HRESULT WINAPI IDirectInputDevice2AImpl_SendDeviceData( ...@@ -529,7 +529,7 @@ HRESULT WINAPI IDirectInputDevice2AImpl_SendDeviceData(
return DI_OK; return DI_OK;
} }
HRESULT WINAPI IDirectInputDevice7AImpl_EnumEffectsInFile(LPDIRECTINPUTDEVICE7A iface, HRESULT WINAPI IDirectInputDevice7AImpl_EnumEffectsInFile(LPDIRECTINPUTDEVICE8A iface,
LPCSTR lpszFileName, LPCSTR lpszFileName,
LPDIENUMEFFECTSINFILECALLBACK pec, LPDIENUMEFFECTSINFILECALLBACK pec,
LPVOID pvRef, LPVOID pvRef,
...@@ -540,7 +540,7 @@ HRESULT WINAPI IDirectInputDevice7AImpl_EnumEffectsInFile(LPDIRECTINPUTDEVICE7A ...@@ -540,7 +540,7 @@ HRESULT WINAPI IDirectInputDevice7AImpl_EnumEffectsInFile(LPDIRECTINPUTDEVICE7A
return DI_OK; return DI_OK;
} }
HRESULT WINAPI IDirectInputDevice7AImpl_WriteEffectToFile(LPDIRECTINPUTDEVICE7A iface, HRESULT WINAPI IDirectInputDevice7AImpl_WriteEffectToFile(LPDIRECTINPUTDEVICE8A iface,
LPCSTR lpszFileName, LPCSTR lpszFileName,
DWORD dwEntries, DWORD dwEntries,
LPDIFILEEFFECT rgDiFileEft, LPDIFILEEFFECT rgDiFileEft,
...@@ -550,3 +550,31 @@ HRESULT WINAPI IDirectInputDevice7AImpl_WriteEffectToFile(LPDIRECTINPUTDEVICE7A ...@@ -550,3 +550,31 @@ HRESULT WINAPI IDirectInputDevice7AImpl_WriteEffectToFile(LPDIRECTINPUTDEVICE7A
return DI_OK; return DI_OK;
} }
HRESULT WINAPI IDirectInputDevice8AImpl_BuildActionMap(LPDIRECTINPUTDEVICE8A iface,
LPDIACTIONFORMATA lpdiaf,
LPCSTR lpszUserName,
DWORD dwFlags)
{
FIXME("(%p)->(%p,%s,%08lx): stub !\n", iface, lpdiaf, lpszUserName, dwFlags);
return DI_OK;
}
HRESULT WINAPI IDirectInputDevice8AImpl_SetActionMap(LPDIRECTINPUTDEVICE8A iface,
LPDIACTIONFORMATA lpdiaf,
LPCSTR lpszUserName,
DWORD dwFlags)
{
FIXME("(%p)->(%p,%s,%08lx): stub !\n", iface, lpdiaf, lpszUserName, dwFlags);
return DI_OK;
}
HRESULT WINAPI IDirectInputDevice8AImpl_GetImageInfo(LPDIRECTINPUTDEVICE8A iface,
LPDIDEVICEIMAGEINFOHEADERA lpdiDevImageInfoHeader)
{
FIXME("(%p)->(%p): stub !\n", iface, lpdiDevImageInfoHeader);
return DI_OK;
}
/* /*
* Copyright 2000 Lionel Ulmer * Copyright 2000 Lionel Ulmer
* Copyright 2000-2001 TransGaming Technologies Inc.
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
...@@ -78,88 +79,98 @@ extern void _dump_OBJECTINSTANCEA(DIDEVICEOBJECTINSTANCEA *ddoi) ; ...@@ -78,88 +79,98 @@ extern void _dump_OBJECTINSTANCEA(DIDEVICEOBJECTINSTANCEA *ddoi) ;
/* And the stubs */ /* And the stubs */
extern HRESULT WINAPI IDirectInputDevice2AImpl_SetDataFormat( extern HRESULT WINAPI IDirectInputDevice2AImpl_SetDataFormat(
LPDIRECTINPUTDEVICE2A iface,LPCDIDATAFORMAT df ) ; LPDIRECTINPUTDEVICE8A iface,LPCDIDATAFORMAT df ) ;
extern HRESULT WINAPI IDirectInputDevice2AImpl_SetCooperativeLevel( extern HRESULT WINAPI IDirectInputDevice2AImpl_SetCooperativeLevel(
LPDIRECTINPUTDEVICE2A iface,HWND hwnd,DWORD dwflags ) ; LPDIRECTINPUTDEVICE8A iface,HWND hwnd,DWORD dwflags ) ;
extern HRESULT WINAPI IDirectInputDevice2AImpl_SetEventNotification( extern HRESULT WINAPI IDirectInputDevice2AImpl_SetEventNotification(
LPDIRECTINPUTDEVICE2A iface,HANDLE hnd ) ; LPDIRECTINPUTDEVICE8A iface,HANDLE hnd ) ;
extern ULONG WINAPI IDirectInputDevice2AImpl_Release(LPDIRECTINPUTDEVICE2A iface) ; extern ULONG WINAPI IDirectInputDevice2AImpl_Release(LPDIRECTINPUTDEVICE8A iface) ;
extern HRESULT WINAPI IDirectInputDevice2AImpl_QueryInterface( extern HRESULT WINAPI IDirectInputDevice2AImpl_QueryInterface(
LPDIRECTINPUTDEVICE2A iface,REFIID riid,LPVOID *ppobj ) ; LPDIRECTINPUTDEVICE8A iface,REFIID riid,LPVOID *ppobj ) ;
extern ULONG WINAPI IDirectInputDevice2AImpl_AddRef( extern ULONG WINAPI IDirectInputDevice2AImpl_AddRef(
LPDIRECTINPUTDEVICE2A iface) ; LPDIRECTINPUTDEVICE8A iface) ;
extern HRESULT WINAPI IDirectInputDevice2AImpl_EnumObjects( extern HRESULT WINAPI IDirectInputDevice2AImpl_EnumObjects(
LPDIRECTINPUTDEVICE2A iface, LPDIRECTINPUTDEVICE8A iface,
LPDIENUMDEVICEOBJECTSCALLBACKA lpCallback, LPDIENUMDEVICEOBJECTSCALLBACKA lpCallback,
LPVOID lpvRef, LPVOID lpvRef,
DWORD dwFlags) ; DWORD dwFlags) ;
extern HRESULT WINAPI IDirectInputDevice2AImpl_GetProperty( extern HRESULT WINAPI IDirectInputDevice2AImpl_GetProperty(
LPDIRECTINPUTDEVICE2A iface, LPDIRECTINPUTDEVICE8A iface,
REFGUID rguid, REFGUID rguid,
LPDIPROPHEADER pdiph) ; LPDIPROPHEADER pdiph) ;
extern HRESULT WINAPI IDirectInputDevice2AImpl_GetObjectInfo( extern HRESULT WINAPI IDirectInputDevice2AImpl_GetObjectInfo(
LPDIRECTINPUTDEVICE2A iface, LPDIRECTINPUTDEVICE8A iface,
LPDIDEVICEOBJECTINSTANCEA pdidoi, LPDIDEVICEOBJECTINSTANCEA pdidoi,
DWORD dwObj, DWORD dwObj,
DWORD dwHow) ; DWORD dwHow) ;
extern HRESULT WINAPI IDirectInputDevice2AImpl_GetDeviceInfo( extern HRESULT WINAPI IDirectInputDevice2AImpl_GetDeviceInfo(
LPDIRECTINPUTDEVICE2A iface, LPDIRECTINPUTDEVICE8A iface,
LPDIDEVICEINSTANCEA pdidi) ; LPDIDEVICEINSTANCEA pdidi) ;
extern HRESULT WINAPI IDirectInputDevice2AImpl_RunControlPanel( extern HRESULT WINAPI IDirectInputDevice2AImpl_RunControlPanel(
LPDIRECTINPUTDEVICE2A iface, LPDIRECTINPUTDEVICE8A iface,
HWND hwndOwner, HWND hwndOwner,
DWORD dwFlags) ; DWORD dwFlags) ;
extern HRESULT WINAPI IDirectInputDevice2AImpl_Initialize( extern HRESULT WINAPI IDirectInputDevice2AImpl_Initialize(
LPDIRECTINPUTDEVICE2A iface, LPDIRECTINPUTDEVICE8A iface,
HINSTANCE hinst, HINSTANCE hinst,
DWORD dwVersion, DWORD dwVersion,
REFGUID rguid) ; REFGUID rguid) ;
extern HRESULT WINAPI IDirectInputDevice2AImpl_CreateEffect( extern HRESULT WINAPI IDirectInputDevice2AImpl_CreateEffect(
LPDIRECTINPUTDEVICE2A iface, LPDIRECTINPUTDEVICE8A iface,
REFGUID rguid, REFGUID rguid,
LPCDIEFFECT lpeff, LPCDIEFFECT lpeff,
LPDIRECTINPUTEFFECT *ppdef, LPDIRECTINPUTEFFECT *ppdef,
LPUNKNOWN pUnkOuter) ; LPUNKNOWN pUnkOuter) ;
extern HRESULT WINAPI IDirectInputDevice2AImpl_EnumEffects( extern HRESULT WINAPI IDirectInputDevice2AImpl_EnumEffects(
LPDIRECTINPUTDEVICE2A iface, LPDIRECTINPUTDEVICE8A iface,
LPDIENUMEFFECTSCALLBACKA lpCallback, LPDIENUMEFFECTSCALLBACKA lpCallback,
LPVOID lpvRef, LPVOID lpvRef,
DWORD dwFlags) ; DWORD dwFlags) ;
extern HRESULT WINAPI IDirectInputDevice2AImpl_GetEffectInfo( extern HRESULT WINAPI IDirectInputDevice2AImpl_GetEffectInfo(
LPDIRECTINPUTDEVICE2A iface, LPDIRECTINPUTDEVICE8A iface,
LPDIEFFECTINFOA lpdei, LPDIEFFECTINFOA lpdei,
REFGUID rguid) ; REFGUID rguid) ;
extern HRESULT WINAPI IDirectInputDevice2AImpl_GetForceFeedbackState( extern HRESULT WINAPI IDirectInputDevice2AImpl_GetForceFeedbackState(
LPDIRECTINPUTDEVICE2A iface, LPDIRECTINPUTDEVICE8A iface,
LPDWORD pdwOut) ; LPDWORD pdwOut) ;
extern HRESULT WINAPI IDirectInputDevice2AImpl_SendForceFeedbackCommand( extern HRESULT WINAPI IDirectInputDevice2AImpl_SendForceFeedbackCommand(
LPDIRECTINPUTDEVICE2A iface, LPDIRECTINPUTDEVICE8A iface,
DWORD dwFlags) ; DWORD dwFlags) ;
extern HRESULT WINAPI IDirectInputDevice2AImpl_EnumCreatedEffectObjects( extern HRESULT WINAPI IDirectInputDevice2AImpl_EnumCreatedEffectObjects(
LPDIRECTINPUTDEVICE2A iface, LPDIRECTINPUTDEVICE8A iface,
LPDIENUMCREATEDEFFECTOBJECTSCALLBACK lpCallback, LPDIENUMCREATEDEFFECTOBJECTSCALLBACK lpCallback,
LPVOID lpvRef, LPVOID lpvRef,
DWORD dwFlags) ; DWORD dwFlags) ;
extern HRESULT WINAPI IDirectInputDevice2AImpl_Escape( extern HRESULT WINAPI IDirectInputDevice2AImpl_Escape(
LPDIRECTINPUTDEVICE2A iface, LPDIRECTINPUTDEVICE8A iface,
LPDIEFFESCAPE lpDIEEsc) ; LPDIEFFESCAPE lpDIEEsc) ;
extern HRESULT WINAPI IDirectInputDevice2AImpl_Poll( extern HRESULT WINAPI IDirectInputDevice2AImpl_Poll(
LPDIRECTINPUTDEVICE2A iface) ; LPDIRECTINPUTDEVICE8A iface) ;
extern HRESULT WINAPI IDirectInputDevice2AImpl_SendDeviceData( extern HRESULT WINAPI IDirectInputDevice2AImpl_SendDeviceData(
LPDIRECTINPUTDEVICE2A iface, LPDIRECTINPUTDEVICE8A iface,
DWORD cbObjectData, DWORD cbObjectData,
LPDIDEVICEOBJECTDATA rgdod, LPCDIDEVICEOBJECTDATA rgdod,
LPDWORD pdwInOut, LPDWORD pdwInOut,
DWORD dwFlags) ; DWORD dwFlags) ;
extern HRESULT WINAPI IDirectInputDevice7AImpl_EnumEffectsInFile(LPDIRECTINPUTDEVICE7A iface, extern HRESULT WINAPI IDirectInputDevice7AImpl_EnumEffectsInFile(LPDIRECTINPUTDEVICE8A iface,
LPCSTR lpszFileName, LPCSTR lpszFileName,
LPDIENUMEFFECTSINFILECALLBACK pec, LPDIENUMEFFECTSINFILECALLBACK pec,
LPVOID pvRef, LPVOID pvRef,
DWORD dwFlags) ; DWORD dwFlags) ;
extern HRESULT WINAPI IDirectInputDevice7AImpl_WriteEffectToFile(LPDIRECTINPUTDEVICE7A iface, extern HRESULT WINAPI IDirectInputDevice7AImpl_WriteEffectToFile(LPDIRECTINPUTDEVICE8A iface,
LPCSTR lpszFileName, LPCSTR lpszFileName,
DWORD dwEntries, DWORD dwEntries,
LPDIFILEEFFECT rgDiFileEft, LPDIFILEEFFECT rgDiFileEft,
DWORD dwFlags) ; DWORD dwFlags) ;
extern HRESULT WINAPI IDirectInputDevice8AImpl_BuildActionMap(LPDIRECTINPUTDEVICE8A iface,
LPDIACTIONFORMATA lpdiaf,
LPCSTR lpszUserName,
DWORD dwFlags);
extern HRESULT WINAPI IDirectInputDevice8AImpl_SetActionMap(LPDIRECTINPUTDEVICE8A iface,
LPDIACTIONFORMATA lpdiaf,
LPCSTR lpszUserName,
DWORD dwFlags);
extern HRESULT WINAPI IDirectInputDevice8AImpl_GetImageInfo(LPDIRECTINPUTDEVICE8A iface,
LPDIDEVICEIMAGEINFOHEADERA lpdiDevImageInfoHeader);
#endif /* __WINE_DLLS_DINPUT_DINPUTDEVICE_PRIVATE_H */ #endif /* __WINE_DLLS_DINPUT_DINPUTDEVICE_PRIVATE_H */
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
* *
* Copyright 1998 Marcus Meissner * Copyright 1998 Marcus Meissner
* Copyright 1998,1999 Lionel Ulmer * Copyright 1998,1999 Lionel Ulmer
* Copyright 2000-2002 TransGaming Technologies Inc.
* *
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
...@@ -26,10 +27,6 @@ ...@@ -26,10 +27,6 @@
* Doesn't get Input Focus. * Doesn't get Input Focus.
* *
* - Fallout : works great in X and DGA mode * - Fallout : works great in X and DGA mode
*
* FIXME: The keyboard handling needs to (and will) be merged into keyboard.c
* (The current implementation is currently only a proof of concept and
* an utter mess.)
*/ */
#include "config.h" #include "config.h"
...@@ -45,8 +42,8 @@ ...@@ -45,8 +42,8 @@
WINE_DEFAULT_DEBUG_CHANNEL(dinput); WINE_DEFAULT_DEBUG_CHANNEL(dinput);
static ICOM_VTABLE(IDirectInputA) ddiavt;
static ICOM_VTABLE(IDirectInput7A) ddi7avt; static ICOM_VTABLE(IDirectInput7A) ddi7avt;
static ICOM_VTABLE(IDirectInput8A) ddi8avt;
/* This array will be filled a dinput.so loading */ /* This array will be filled a dinput.so loading */
#define MAX_WINE_DINPUT_DEVICES 4 #define MAX_WINE_DINPUT_DEVICES 4
...@@ -103,19 +100,22 @@ HRESULT WINAPI DirectInputCreateEx( ...@@ -103,19 +100,22 @@ HRESULT WINAPI DirectInputCreateEx(
TRACE("(0x%08lx,%04lx,%s,%p,%p)\n", TRACE("(0x%08lx,%04lx,%s,%p,%p)\n",
(DWORD)hinst,dwVersion,debugstr_guid(riid),ppDI,punkOuter (DWORD)hinst,dwVersion,debugstr_guid(riid),ppDI,punkOuter
); );
if (IsEqualGUID(&IID_IDirectInputA,riid)) { if (IsEqualGUID(&IID_IDirectInputA,riid) ||
IsEqualGUID(&IID_IDirectInput2A,riid) ||
IsEqualGUID(&IID_IDirectInput7A,riid)) {
This = (IDirectInputAImpl*)HeapAlloc(GetProcessHeap(),0,sizeof(IDirectInputAImpl)); This = (IDirectInputAImpl*)HeapAlloc(GetProcessHeap(),0,sizeof(IDirectInputAImpl));
This->lpVtbl = &ddi7avt;
This->ref = 1; This->ref = 1;
ICOM_VTBL(This) = &ddiavt;
*ppDI = This; *ppDI = This;
return DI_OK; return DI_OK;
} }
if (IsEqualGUID(&IID_IDirectInput7A,riid)) {
if (IsEqualGUID(&IID_IDirectInput8A,riid)) {
This = (IDirectInputAImpl*)HeapAlloc(GetProcessHeap(),0,sizeof(IDirectInputAImpl)); This = (IDirectInputAImpl*)HeapAlloc(GetProcessHeap(),0,sizeof(IDirectInputAImpl));
This->lpVtbl = &ddi8avt;
This->ref = 1; This->ref = 1;
ICOM_VTBL(This) = (ICOM_VTABLE(IDirectInputA) *) &ddi7avt;
*ppDI = This; *ppDI = This;
return DI_OK; return DI_OK;
...@@ -134,10 +134,11 @@ HRESULT WINAPI DirectInputCreateA(HINSTANCE hinst, DWORD dwVersion, LPDIRECTINPU ...@@ -134,10 +134,11 @@ HRESULT WINAPI DirectInputCreateA(HINSTANCE hinst, DWORD dwVersion, LPDIRECTINPU
(DWORD)hinst,dwVersion,ppDI,punkOuter (DWORD)hinst,dwVersion,ppDI,punkOuter
); );
This = (IDirectInputAImpl*)HeapAlloc(GetProcessHeap(),0,sizeof(IDirectInputAImpl)); This = (IDirectInputAImpl*)HeapAlloc(GetProcessHeap(),0,sizeof(IDirectInputAImpl));
This->lpVtbl = &ddi7avt;
This->ref = 1; This->ref = 1;
ICOM_VTBL(This) = &ddiavt;
*ppDI=(IDirectInputA*)This; *ppDI=(IDirectInputA*)This;
return 0; return 0;
} }
/****************************************************************************** /******************************************************************************
* IDirectInputA_EnumDevices * IDirectInputA_EnumDevices
...@@ -155,6 +156,7 @@ static HRESULT WINAPI IDirectInputAImpl_EnumDevices( ...@@ -155,6 +156,7 @@ static HRESULT WINAPI IDirectInputAImpl_EnumDevices(
for (i = 0; i < nrof_dinput_devices; i++) { for (i = 0; i < nrof_dinput_devices; i++) {
if (dinput_devices[i]->enum_device(dwDevType, dwFlags, &devInstance)) { if (dinput_devices[i]->enum_device(dwDevType, dwFlags, &devInstance)) {
devInstance.dwSize = sizeof(devInstance);
if (lpCallback(&devInstance,pvRef) == DIENUM_STOP) if (lpCallback(&devInstance,pvRef) == DIENUM_STOP)
return 0; return 0;
} }
...@@ -163,6 +165,24 @@ static HRESULT WINAPI IDirectInputAImpl_EnumDevices( ...@@ -163,6 +165,24 @@ static HRESULT WINAPI IDirectInputAImpl_EnumDevices(
return 0; return 0;
} }
static HRESULT WINAPI IDirectInputAImpl_QueryInterface(
LPDIRECTINPUT7A iface,REFIID riid,LPVOID *ppobj
) {
ICOM_THIS(IDirectInputAImpl,iface);
TRACE("(this=%p,%s,%p)\n",This,debugstr_guid(riid),ppobj);
if (IsEqualGUID(&IID_IUnknown,riid) ||
IsEqualGUID(&IID_IDirectInputA,riid) ||
IsEqualGUID(&IID_IDirectInput2A,riid) ||
IsEqualGUID(&IID_IDirectInput7A,riid)) {
IDirectInputA_AddRef(iface);
*ppobj = This;
return 0;
}
TRACE("Unsupported interface !\n");
return E_FAIL;
}
static ULONG WINAPI IDirectInputAImpl_AddRef(LPDIRECTINPUT7A iface) static ULONG WINAPI IDirectInputAImpl_AddRef(LPDIRECTINPUT7A iface)
{ {
ICOM_THIS(IDirectInputAImpl,iface); ICOM_THIS(IDirectInputAImpl,iface);
...@@ -202,26 +222,6 @@ static HRESULT WINAPI IDirectInputAImpl_CreateDevice( ...@@ -202,26 +222,6 @@ static HRESULT WINAPI IDirectInputAImpl_CreateDevice(
return ret_value; return ret_value;
} }
static HRESULT WINAPI IDirectInputAImpl_QueryInterface(
LPDIRECTINPUT7A iface,REFIID riid,LPVOID *ppobj
) {
ICOM_THIS(IDirectInputAImpl,iface);
TRACE("(this=%p,%s,%p)\n",This,debugstr_guid(riid),ppobj);
if (IsEqualGUID(&IID_IUnknown,riid)) {
IDirectInputA_AddRef(iface);
*ppobj = This;
return 0;
}
if (IsEqualGUID(&IID_IDirectInputA,riid)) {
IDirectInputA_AddRef(iface);
*ppobj = This;
return 0;
}
TRACE("Unsupported interface !\n");
return E_FAIL;
}
static HRESULT WINAPI IDirectInputAImpl_Initialize( static HRESULT WINAPI IDirectInputAImpl_Initialize(
LPDIRECTINPUT7A iface,HINSTANCE hinst,DWORD x LPDIRECTINPUT7A iface,HINSTANCE hinst,DWORD x
) { ) {
...@@ -246,7 +246,7 @@ static HRESULT WINAPI IDirectInputAImpl_RunControlPanel(LPDIRECTINPUT7A iface, ...@@ -246,7 +246,7 @@ static HRESULT WINAPI IDirectInputAImpl_RunControlPanel(LPDIRECTINPUT7A iface,
return DI_OK; return DI_OK;
} }
static HRESULT WINAPI IDirectInput2AImpl_FindDevice(LPDIRECTINPUT2A iface, REFGUID rguid, static HRESULT WINAPI IDirectInput2AImpl_FindDevice(LPDIRECTINPUT7A iface, REFGUID rguid,
LPCSTR pszName, LPGUID pguidInstance) { LPCSTR pszName, LPGUID pguidInstance) {
ICOM_THIS(IDirectInputAImpl,iface); ICOM_THIS(IDirectInputAImpl,iface);
FIXME("(%p)->(%s, %s, %p): stub\n", This, debugstr_guid(rguid), pszName, pguidInstance); FIXME("(%p)->(%s, %s, %p): stub\n", This, debugstr_guid(rguid), pszName, pguidInstance);
...@@ -276,14 +276,54 @@ static HRESULT WINAPI IDirectInput7AImpl_CreateDeviceEx(LPDIRECTINPUT7A iface, R ...@@ -276,14 +276,54 @@ static HRESULT WINAPI IDirectInput7AImpl_CreateDeviceEx(LPDIRECTINPUT7A iface, R
return ret_value; return ret_value;
} }
static HRESULT WINAPI IDirectInput8AImpl_QueryInterface(
LPDIRECTINPUT8A iface,REFIID riid,LPVOID *ppobj
) {
ICOM_THIS(IDirectInputAImpl,iface);
TRACE("(this=%p,%s,%p)\n",This,debugstr_guid(riid),ppobj);
if (IsEqualGUID(&IID_IUnknown,riid) ||
IsEqualGUID(&IID_IDirectInput8A,riid)) {
IDirectInputA_AddRef(iface);
*ppobj = This;
return 0;
}
TRACE("Unsupported interface !\n");
return E_FAIL;
}
static HRESULT WINAPI IDirectInput8AImpl_EnumDevicesBySemantics(
LPDIRECTINPUT8A iface, LPCSTR ptszUserName, LPDIACTIONFORMATA lpdiActionFormat,
LPDIENUMDEVICESBYSEMANTICSCBA lpCallback,
LPVOID pvRef, DWORD dwFlags
)
{
ICOM_THIS(IDirectInputAImpl,iface);
FIXME("(this=%p,%s,%p,%p,%p,%04lx): stub\n", This, ptszUserName, lpdiActionFormat,
lpCallback, pvRef, dwFlags);
return 0;
}
static HRESULT WINAPI IDirectInput8AImpl_ConfigureDevices(
LPDIRECTINPUT8A iface, LPDICONFIGUREDEVICESCALLBACK lpdiCallback,
LPDICONFIGUREDEVICESPARAMSA lpdiCDParams, DWORD dwFlags, LPVOID pvRefData
)
{
ICOM_THIS(IDirectInputAImpl,iface);
FIXME("(this=%p,%p,%p,%04lx,%p): stub\n", This, lpdiCallback, lpdiCDParams,
dwFlags, pvRefData);
return 0;
}
#if !defined(__STRICT_ANSI__) && defined(__GNUC__) #if !defined(__STRICT_ANSI__) && defined(__GNUC__)
# define XCAST(fun) (typeof(ddiavt.fun)) # define XCAST(fun) (typeof(ddi7avt.fun))
#else #else
# define XCAST(fun) (void*) # define XCAST(fun) (void*)
#endif #endif
static ICOM_VTABLE(IDirectInputA) ddiavt = static ICOM_VTABLE(IDirectInput7A) ddi7avt = {
{
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
XCAST(QueryInterface)IDirectInputAImpl_QueryInterface, XCAST(QueryInterface)IDirectInputAImpl_QueryInterface,
XCAST(AddRef)IDirectInputAImpl_AddRef, XCAST(AddRef)IDirectInputAImpl_AddRef,
...@@ -292,19 +332,21 @@ static ICOM_VTABLE(IDirectInputA) ddiavt = ...@@ -292,19 +332,21 @@ static ICOM_VTABLE(IDirectInputA) ddiavt =
XCAST(EnumDevices)IDirectInputAImpl_EnumDevices, XCAST(EnumDevices)IDirectInputAImpl_EnumDevices,
XCAST(GetDeviceStatus)IDirectInputAImpl_GetDeviceStatus, XCAST(GetDeviceStatus)IDirectInputAImpl_GetDeviceStatus,
XCAST(RunControlPanel)IDirectInputAImpl_RunControlPanel, XCAST(RunControlPanel)IDirectInputAImpl_RunControlPanel,
XCAST(Initialize)IDirectInputAImpl_Initialize XCAST(Initialize)IDirectInputAImpl_Initialize,
XCAST(FindDevice)IDirectInput2AImpl_FindDevice,
IDirectInput7AImpl_CreateDeviceEx
}; };
#undef XCAST #undef XCAST
#if !defined(__STRICT_ANSI__) && defined(__GNUC__) #if !defined(__STRICT_ANSI__) && defined(__GNUC__)
# define XCAST(fun) (typeof(ddi7avt.fun)) # define XCAST(fun) (typeof(ddi8avt.fun))
#else #else
# define XCAST(fun) (void*) # define XCAST(fun) (void*)
#endif #endif
static ICOM_VTABLE(IDirectInput7A) ddi7avt = { static ICOM_VTABLE(IDirectInput8A) ddi8avt = {
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
XCAST(QueryInterface)IDirectInputAImpl_QueryInterface, XCAST(QueryInterface)IDirectInput8AImpl_QueryInterface,
XCAST(AddRef)IDirectInputAImpl_AddRef, XCAST(AddRef)IDirectInputAImpl_AddRef,
XCAST(Release)IDirectInputAImpl_Release, XCAST(Release)IDirectInputAImpl_Release,
XCAST(CreateDevice)IDirectInputAImpl_CreateDevice, XCAST(CreateDevice)IDirectInputAImpl_CreateDevice,
...@@ -313,7 +355,8 @@ static ICOM_VTABLE(IDirectInput7A) ddi7avt = { ...@@ -313,7 +355,8 @@ static ICOM_VTABLE(IDirectInput7A) ddi7avt = {
XCAST(RunControlPanel)IDirectInputAImpl_RunControlPanel, XCAST(RunControlPanel)IDirectInputAImpl_RunControlPanel,
XCAST(Initialize)IDirectInputAImpl_Initialize, XCAST(Initialize)IDirectInputAImpl_Initialize,
XCAST(FindDevice)IDirectInput2AImpl_FindDevice, XCAST(FindDevice)IDirectInput2AImpl_FindDevice,
IDirectInput7AImpl_CreateDeviceEx IDirectInput8AImpl_EnumDevicesBySemantics,
IDirectInput8AImpl_ConfigureDevices
}; };
#undef XCAST #undef XCAST
......
...@@ -26,11 +26,11 @@ ...@@ -26,11 +26,11 @@
typedef struct IDirectInputAImpl IDirectInputAImpl; typedef struct IDirectInputAImpl IDirectInputAImpl;
struct IDirectInputAImpl struct IDirectInputAImpl
{ {
ICOM_VFIELD(IDirectInputA); LPVOID lpVtbl;
DWORD ref; DWORD ref;
/* Used to have an unique sequence number for all the events */ /* Used to have an unique sequence number for all the events */
DWORD evsequence; DWORD evsequence;
}; };
/* Function called by all devices that Wine supports */ /* Function called by all devices that Wine supports */
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
* *
* Copyright 1998 Marcus Meissner * Copyright 1998 Marcus Meissner
* Copyright 1998,1999 Lionel Ulmer * Copyright 1998,1999 Lionel Ulmer
* Copyright 2000-2001 TransGaming Technologies Inc.
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
...@@ -35,14 +36,12 @@ ...@@ -35,14 +36,12 @@
WINE_DEFAULT_DEBUG_CHANNEL(dinput); WINE_DEFAULT_DEBUG_CHANNEL(dinput);
static ICOM_VTABLE(IDirectInputDevice2A) SysKeyboardAvt; static ICOM_VTABLE(IDirectInputDevice8A) SysKeyboardAvt;
static ICOM_VTABLE(IDirectInputDevice7A) SysKeyboard7Avt;
typedef struct SysKeyboardAImpl SysKeyboardAImpl; typedef struct SysKeyboardAImpl SysKeyboardAImpl;
struct SysKeyboardAImpl struct SysKeyboardAImpl
{ {
/* IDirectInputDevice2AImpl */ LPVOID lpVtbl;
ICOM_VFIELD(IDirectInputDevice2A);
DWORD ref; DWORD ref;
GUID guid; GUID guid;
...@@ -151,12 +150,12 @@ static BOOL keyboarddev_enum_device(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEIN ...@@ -151,12 +150,12 @@ static BOOL keyboarddev_enum_device(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEIN
return FALSE; return FALSE;
} }
static SysKeyboardAImpl *alloc_device(REFGUID rguid, ICOM_VTABLE(IDirectInputDevice2A) *kvt, IDirectInputAImpl *dinput) static SysKeyboardAImpl *alloc_device(REFGUID rguid, LPVOID kvt, IDirectInputAImpl *dinput)
{ {
SysKeyboardAImpl* newDevice; SysKeyboardAImpl* newDevice;
newDevice = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(SysKeyboardAImpl)); newDevice = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(SysKeyboardAImpl));
newDevice->lpVtbl = kvt;
newDevice->ref = 1; newDevice->ref = 1;
ICOM_VTBL(newDevice) = kvt;
memcpy(&(newDevice->guid),rguid,sizeof(*rguid)); memcpy(&(newDevice->guid),rguid,sizeof(*rguid));
newDevice->dinput = dinput; newDevice->dinput = dinput;
...@@ -168,16 +167,14 @@ static HRESULT keyboarddev_create_device(IDirectInputAImpl *dinput, REFGUID rgui ...@@ -168,16 +167,14 @@ static HRESULT keyboarddev_create_device(IDirectInputAImpl *dinput, REFGUID rgui
{ {
if ((IsEqualGUID(&GUID_SysKeyboard,rguid)) || /* Generic Keyboard */ if ((IsEqualGUID(&GUID_SysKeyboard,rguid)) || /* Generic Keyboard */
(IsEqualGUID(&DInput_Wine_Keyboard_GUID,rguid))) { /* Wine Keyboard */ (IsEqualGUID(&DInput_Wine_Keyboard_GUID,rguid))) { /* Wine Keyboard */
if ((riid == NULL) || (IsEqualGUID(&IID_IDirectInputDevice2A,riid)) || (IsEqualGUID(&IID_IDirectInputDevice2A,riid))) { if ((riid == NULL) ||
IsEqualGUID(&IID_IDirectInputDeviceA,riid) ||
IsEqualGUID(&IID_IDirectInputDevice2A,riid) ||
IsEqualGUID(&IID_IDirectInputDevice7A,riid) ||
IsEqualGUID(&IID_IDirectInputDevice8A,riid)) {
*pdev=(IDirectInputDeviceA*) alloc_device(rguid, &SysKeyboardAvt, dinput); *pdev=(IDirectInputDeviceA*) alloc_device(rguid, &SysKeyboardAvt, dinput);
TRACE("Creating a Keyboard device (%p)\n", *pdev); TRACE("Creating a Keyboard device (%p)\n", *pdev);
return DI_OK; return DI_OK;
} else if (IsEqualGUID(&IID_IDirectInputDevice7A,riid)) {
*pdev=(IDirectInputDeviceA*) alloc_device(rguid, (ICOM_VTABLE(IDirectInputDevice2A) *) &SysKeyboard7Avt, dinput);
TRACE("Creating a Keyboard DInput7A device (%p)\n", *pdev);
return DI_OK;
} else } else
return DIERR_NOINTERFACE; return DIERR_NOINTERFACE;
} }
...@@ -194,7 +191,7 @@ static dinput_device keyboarddev = { ...@@ -194,7 +191,7 @@ static dinput_device keyboarddev = {
DECL_GLOBAL_CONSTRUCTOR(keyboarddev_register) { dinput_register_device(&keyboarddev); } DECL_GLOBAL_CONSTRUCTOR(keyboarddev_register) { dinput_register_device(&keyboarddev); }
static HRESULT WINAPI SysKeyboardAImpl_SetProperty( static HRESULT WINAPI SysKeyboardAImpl_SetProperty(
LPDIRECTINPUTDEVICE2A iface,REFGUID rguid,LPCDIPROPHEADER ph LPDIRECTINPUTDEVICE8A iface,REFGUID rguid,LPCDIPROPHEADER ph
) )
{ {
ICOM_THIS(SysKeyboardAImpl,iface); ICOM_THIS(SysKeyboardAImpl,iface);
...@@ -225,7 +222,7 @@ static HRESULT WINAPI SysKeyboardAImpl_SetProperty( ...@@ -225,7 +222,7 @@ static HRESULT WINAPI SysKeyboardAImpl_SetProperty(
} }
static HRESULT WINAPI SysKeyboardAImpl_GetDeviceState( static HRESULT WINAPI SysKeyboardAImpl_GetDeviceState(
LPDIRECTINPUTDEVICE2A iface,DWORD len,LPVOID ptr LPDIRECTINPUTDEVICE8A iface,DWORD len,LPVOID ptr
) )
{ {
/* Note: device does not need to be acquired */ /* Note: device does not need to be acquired */
...@@ -237,7 +234,7 @@ static HRESULT WINAPI SysKeyboardAImpl_GetDeviceState( ...@@ -237,7 +234,7 @@ static HRESULT WINAPI SysKeyboardAImpl_GetDeviceState(
} }
static HRESULT WINAPI SysKeyboardAImpl_GetDeviceData( static HRESULT WINAPI SysKeyboardAImpl_GetDeviceData(
LPDIRECTINPUTDEVICE2A iface,DWORD dodsize,LPDIDEVICEOBJECTDATA dod, LPDIRECTINPUTDEVICE8A iface,DWORD dodsize,LPDIDEVICEOBJECTDATA dod,
LPDWORD entries,DWORD flags LPDWORD entries,DWORD flags
) )
{ {
...@@ -289,9 +286,9 @@ static HRESULT WINAPI SysKeyboardAImpl_GetDeviceData( ...@@ -289,9 +286,9 @@ static HRESULT WINAPI SysKeyboardAImpl_GetDeviceData(
return ret; return ret;
} }
static HRESULT WINAPI SysKeyboardAImpl_Unacquire(LPDIRECTINPUTDEVICE2A iface); static HRESULT WINAPI SysKeyboardAImpl_Unacquire(LPDIRECTINPUTDEVICE8A iface);
static HRESULT WINAPI SysKeyboardAImpl_Acquire(LPDIRECTINPUTDEVICE2A iface) static HRESULT WINAPI SysKeyboardAImpl_Acquire(LPDIRECTINPUTDEVICE8A iface)
{ {
ICOM_THIS(SysKeyboardAImpl,iface); ICOM_THIS(SysKeyboardAImpl,iface);
...@@ -325,7 +322,7 @@ static HRESULT WINAPI SysKeyboardAImpl_Acquire(LPDIRECTINPUTDEVICE2A iface) ...@@ -325,7 +322,7 @@ static HRESULT WINAPI SysKeyboardAImpl_Acquire(LPDIRECTINPUTDEVICE2A iface)
return DI_OK; return DI_OK;
} }
static HRESULT WINAPI SysKeyboardAImpl_Unacquire(LPDIRECTINPUTDEVICE2A iface) static HRESULT WINAPI SysKeyboardAImpl_Unacquire(LPDIRECTINPUTDEVICE8A iface)
{ {
ICOM_THIS(SysKeyboardAImpl,iface); ICOM_THIS(SysKeyboardAImpl,iface);
TRACE("(this=%p)\n",This); TRACE("(this=%p)\n",This);
...@@ -350,8 +347,8 @@ static HRESULT WINAPI SysKeyboardAImpl_Unacquire(LPDIRECTINPUTDEVICE2A iface) ...@@ -350,8 +347,8 @@ static HRESULT WINAPI SysKeyboardAImpl_Unacquire(LPDIRECTINPUTDEVICE2A iface)
return DI_OK; return DI_OK;
} }
static HRESULT WINAPI SysKeyboardAImpl_SetEventNotification(LPDIRECTINPUTDEVICE2A iface, static HRESULT WINAPI SysKeyboardAImpl_SetEventNotification(LPDIRECTINPUTDEVICE8A iface,
HANDLE hnd) { HANDLE hnd) {
ICOM_THIS(SysKeyboardAImpl,iface); ICOM_THIS(SysKeyboardAImpl,iface);
TRACE("(this=%p,0x%08lx)\n",This,(DWORD)hnd); TRACE("(this=%p,0x%08lx)\n",This,(DWORD)hnd);
...@@ -364,7 +361,7 @@ static HRESULT WINAPI SysKeyboardAImpl_SetEventNotification(LPDIRECTINPUTDEVICE2 ...@@ -364,7 +361,7 @@ static HRESULT WINAPI SysKeyboardAImpl_SetEventNotification(LPDIRECTINPUTDEVICE2
* GetCapabilities : get the device capablitites * GetCapabilities : get the device capablitites
*/ */
static HRESULT WINAPI SysKeyboardAImpl_GetCapabilities( static HRESULT WINAPI SysKeyboardAImpl_GetCapabilities(
LPDIRECTINPUTDEVICE2A iface, LPDIRECTINPUTDEVICE8A iface,
LPDIDEVCAPS lpDIDevCaps) LPDIDEVCAPS lpDIDevCaps)
{ {
ICOM_THIS(SysKeyboardAImpl,iface); ICOM_THIS(SysKeyboardAImpl,iface);
...@@ -390,7 +387,7 @@ static HRESULT WINAPI SysKeyboardAImpl_GetCapabilities( ...@@ -390,7 +387,7 @@ static HRESULT WINAPI SysKeyboardAImpl_GetCapabilities(
return DI_OK; return DI_OK;
} }
static ICOM_VTABLE(IDirectInputDevice2A) SysKeyboardAvt = static ICOM_VTABLE(IDirectInputDevice8A) SysKeyboardAvt =
{ {
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
IDirectInputDevice2AImpl_QueryInterface, IDirectInputDevice2AImpl_QueryInterface,
...@@ -419,47 +416,10 @@ static ICOM_VTABLE(IDirectInputDevice2A) SysKeyboardAvt = ...@@ -419,47 +416,10 @@ static ICOM_VTABLE(IDirectInputDevice2A) SysKeyboardAvt =
IDirectInputDevice2AImpl_EnumCreatedEffectObjects, IDirectInputDevice2AImpl_EnumCreatedEffectObjects,
IDirectInputDevice2AImpl_Escape, IDirectInputDevice2AImpl_Escape,
IDirectInputDevice2AImpl_Poll, IDirectInputDevice2AImpl_Poll,
IDirectInputDevice2AImpl_SendDeviceData IDirectInputDevice2AImpl_SendDeviceData,
}; IDirectInputDevice7AImpl_EnumEffectsInFile,
IDirectInputDevice7AImpl_WriteEffectToFile,
#if !defined(__STRICT_ANSI__) && defined(__GNUC__) IDirectInputDevice8AImpl_BuildActionMap,
# define XCAST(fun) (typeof(SysKeyboard7Avt.fun)) IDirectInputDevice8AImpl_SetActionMap,
#else IDirectInputDevice8AImpl_GetImageInfo
# define XCAST(fun) (void*)
#endif
static ICOM_VTABLE(IDirectInputDevice7A) SysKeyboard7Avt =
{
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
XCAST(QueryInterface)IDirectInputDevice2AImpl_QueryInterface,
XCAST(AddRef)IDirectInputDevice2AImpl_AddRef,
XCAST(Release)IDirectInputDevice2AImpl_Release,
XCAST(GetCapabilities)SysKeyboardAImpl_GetCapabilities,
XCAST(EnumObjects)IDirectInputDevice2AImpl_EnumObjects,
XCAST(GetProperty)IDirectInputDevice2AImpl_GetProperty,
XCAST(SetProperty)SysKeyboardAImpl_SetProperty,
XCAST(Acquire)SysKeyboardAImpl_Acquire,
XCAST(Unacquire)SysKeyboardAImpl_Unacquire,
XCAST(GetDeviceState)SysKeyboardAImpl_GetDeviceState,
XCAST(GetDeviceData)SysKeyboardAImpl_GetDeviceData,
XCAST(SetDataFormat)IDirectInputDevice2AImpl_SetDataFormat,
XCAST(SetEventNotification)SysKeyboardAImpl_SetEventNotification,
XCAST(SetCooperativeLevel)IDirectInputDevice2AImpl_SetCooperativeLevel,
XCAST(GetObjectInfo)IDirectInputDevice2AImpl_GetObjectInfo,
XCAST(GetDeviceInfo)IDirectInputDevice2AImpl_GetDeviceInfo,
XCAST(RunControlPanel)IDirectInputDevice2AImpl_RunControlPanel,
XCAST(Initialize)IDirectInputDevice2AImpl_Initialize,
XCAST(CreateEffect)IDirectInputDevice2AImpl_CreateEffect,
XCAST(EnumEffects)IDirectInputDevice2AImpl_EnumEffects,
XCAST(GetEffectInfo)IDirectInputDevice2AImpl_GetEffectInfo,
XCAST(GetForceFeedbackState)IDirectInputDevice2AImpl_GetForceFeedbackState,
XCAST(SendForceFeedbackCommand)IDirectInputDevice2AImpl_SendForceFeedbackCommand,
XCAST(EnumCreatedEffectObjects)IDirectInputDevice2AImpl_EnumCreatedEffectObjects,
XCAST(Escape)IDirectInputDevice2AImpl_Escape,
XCAST(Poll)IDirectInputDevice2AImpl_Poll,
XCAST(SendDeviceData)IDirectInputDevice2AImpl_SendDeviceData,
IDirectInputDevice7AImpl_EnumEffectsInFile,
IDirectInputDevice7AImpl_WriteEffectToFile
}; };
#undef XCAST
Makefile
dinput8.dll.dbg.c
dinput8.spec.c
TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../..
SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = dinput8.dll
IMPORTS = dinput
EXTRALIBS = $(LIBUUID)
LDDLLFLAGS = @LDDLLFLAGS@
SYMBOLFILE = $(MODULE).tmp.o
C_SRCS = \
dinput8_main.c
@MAKE_DLL_RULES@
### Dependencies:
name dinput8
@ stdcall DirectInput8Create(long long ptr ptr ptr) DirectInput8Create
@ stdcall DllCanUnloadNow() DINPUT8_DllCanUnloadNow
@ stdcall DllGetClassObject(ptr ptr ptr) DINPUT8_DllGetClassObject
@ stdcall DllRegisterServer() DINPUT8_DllRegisterServer
@ stdcall DllUnregisterServer() DINPUT8_DllUnregisterServer
/* DirectInput 8
*
* Copyright 2002 TransGaming Technologies Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "config.h"
#include <assert.h>
#include <string.h>
#include "wine/debug.h"
#include "winbase.h"
#include "winerror.h"
#include "windef.h"
#include "dinput.h"
WINE_DEFAULT_DEBUG_CHANNEL(dinput);
/******************************************************************************
* DirectInput8Create (DINPUT8.@)
*/
HRESULT WINAPI DirectInput8Create(
HINSTANCE hinst, DWORD dwVersion, REFIID riid, LPVOID *ppDI,
LPUNKNOWN punkOuter
) {
return DirectInputCreateEx(hinst, dwVersion, riid, ppDI, punkOuter);
}
/***********************************************************************
* DllCanUnloadNow (DINPUT8.@)
*/
HRESULT WINAPI DINPUT8_DllCanUnloadNow(void)
{
FIXME("(void): stub\n");
return S_FALSE;
}
/***********************************************************************
* DllGetClassObject (DINPUT8.@)
*/
HRESULT WINAPI DINPUT8_DllGetClassObject(REFCLSID rclsid, REFIID riid,
LPVOID *ppv)
{
FIXME("(%p, %p, %p): stub\n", debugstr_guid(rclsid),
debugstr_guid(riid), ppv);
return CLASS_E_CLASSNOTAVAILABLE;
}
/***********************************************************************
* DllRegisterServer (DINPUT8.@)
*/
HRESULT WINAPI DINPUT8_DllRegisterServer(void)
{
FIXME("(void): stub\n");
return S_OK;
}
/***********************************************************************
* DllUnregisterServer (DINPUT8.@)
*/
HRESULT WINAPI DINPUT8_DllUnregisterServer(void)
{
FIXME("(void): stub\n");
return S_OK;
}
...@@ -77,7 +77,10 @@ typedef HRESULT (CALLBACK *LPD3DVALIDATECALLBACK)(LPVOID lpUserArg, DWORD dwOffs ...@@ -77,7 +77,10 @@ typedef HRESULT (CALLBACK *LPD3DVALIDATECALLBACK)(LPVOID lpUserArg, DWORD dwOffs
typedef HRESULT (CALLBACK *LPD3DENUMTEXTUREFORMATSCALLBACK)(LPDDSURFACEDESC lpDdsd, LPVOID lpContext); typedef HRESULT (CALLBACK *LPD3DENUMTEXTUREFORMATSCALLBACK)(LPDDSURFACEDESC lpDdsd, LPVOID lpContext);
typedef HRESULT (CALLBACK *LPD3DENUMPIXELFORMATSCALLBACK)(LPDDPIXELFORMAT lpDDPixFmt, LPVOID lpContext); typedef HRESULT (CALLBACK *LPD3DENUMPIXELFORMATSCALLBACK)(LPDDPIXELFORMAT lpDDPixFmt, LPVOID lpContext);
#ifndef D3DCOLOR_DEFINED
typedef DWORD D3DCOLOR, *LPD3DCOLOR; typedef DWORD D3DCOLOR, *LPD3DCOLOR;
#define D3DCOLOR_DEFINED
#endif
typedef DWORD D3DMATERIALHANDLE, *LPD3DMATERIALHANDLE; typedef DWORD D3DMATERIALHANDLE, *LPD3DMATERIALHANDLE;
typedef DWORD D3DTEXTUREHANDLE, *LPD3DTEXTUREHANDLE; typedef DWORD D3DTEXTUREHANDLE, *LPD3DTEXTUREHANDLE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment