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
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
......@@ -13620,6 +13620,7 @@ do
"dlls/ddraw/Makefile" ) CONFIG_FILES="$CONFIG_FILES dlls/ddraw/Makefile" ;;
"dlls/devenum/Makefile" ) CONFIG_FILES="$CONFIG_FILES dlls/devenum/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/dplayx/Makefile" ) CONFIG_FILES="$CONFIG_FILES dlls/dplayx/Makefile" ;;
"dlls/dsound/Makefile" ) CONFIG_FILES="$CONFIG_FILES dlls/dsound/Makefile" ;;
......
......@@ -1247,6 +1247,7 @@ dlls/dciman32/Makefile
dlls/ddraw/Makefile
dlls/devenum/Makefile
dlls/dinput/Makefile
dlls/dinput8/Makefile
dlls/dplay/Makefile
dlls/dplayx/Makefile
dlls/dsound/Makefile
......
......@@ -26,6 +26,7 @@ BASEDIRS = \
dciman32 \
devenum \
dinput \
dinput8 \
dplay \
dplayx \
dsound \
......@@ -134,6 +135,7 @@ all: \
ddeml.dll$(DLLEXT) \
devenum.dll$(DLLEXT) \
dinput.dll$(DLLEXT) \
dinput8.dll$(DLLEXT) \
dispdib.dll$(DLLEXT) \
display.dll$(DLLEXT) \
dplay.dll$(DLLEXT) \
......@@ -289,6 +291,9 @@ devenum.dll$(DLLEXT): devenum/devenum.dll$(DLLEXT)
dinput.dll$(DLLEXT): 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)
$(RM) $@ && $(LN_S) dplay/dplay.dll$(DLLEXT) $@
......@@ -546,6 +551,7 @@ dciman32/dciman32.dll$(DLLEXT): dciman32
ddraw/ddraw.dll$(DLLEXT): ddraw
devenum/devenum.dll$(DLLEXT): devenum
dinput/dinput.dll$(DLLEXT): dinput
dinput8/dinput8.dll$(DLLEXT): dinput8
dplay/dplay.dll$(DLLEXT): dplay
dplayx/dplayx.dll$(DLLEXT): dplayx
dsound/dsound.dll$(DLLEXT): dsound
......@@ -642,6 +648,7 @@ dciman32: kernel32.dll$(DLLEXT)
ddraw: user32.dll$(DLLEXT) gdi32.dll$(DLLEXT) kernel32.dll$(DLLEXT) libuser32.dll.$(LIBEXT) \
libgdi32.dll.$(LIBEXT) libkernel32.dll.$(LIBEXT)
devenum: kernel32.dll$(DLLEXT)
dinput8: dinput.dll$(DLLEXT)
dinput: user32.dll$(DLLEXT) kernel32.dll$(DLLEXT)
dplay: dplayx.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
*/
HRESULT WINAPI IDirectInputDevice2AImpl_SetDataFormat(
LPDIRECTINPUTDEVICE2A iface,LPCDIDATAFORMAT df
LPDIRECTINPUTDEVICE8A iface,LPCDIDATAFORMAT df
) {
int i;
ICOM_THIS(IDirectInputDevice2AImpl,iface);
......@@ -295,7 +295,7 @@ HRESULT WINAPI IDirectInputDevice2AImpl_SetDataFormat(
}
HRESULT WINAPI IDirectInputDevice2AImpl_SetCooperativeLevel(
LPDIRECTINPUTDEVICE2A iface,HWND hwnd,DWORD dwflags
LPDIRECTINPUTDEVICE8A iface,HWND hwnd,DWORD dwflags
) {
ICOM_THIS(IDirectInputDevice2AImpl,iface);
TRACE("(this=%p,0x%08lx,0x%08lx)\n",This,(DWORD)hwnd,dwflags);
......@@ -305,14 +305,14 @@ HRESULT WINAPI IDirectInputDevice2AImpl_SetCooperativeLevel(
}
HRESULT WINAPI IDirectInputDevice2AImpl_SetEventNotification(
LPDIRECTINPUTDEVICE2A iface,HANDLE hnd
LPDIRECTINPUTDEVICE8A iface,HANDLE hnd
) {
ICOM_THIS(IDirectInputDevice2AImpl,iface);
FIXME("(this=%p,0x%08lx): stub\n",This,(DWORD)hnd);
return 0;
}
ULONG WINAPI IDirectInputDevice2AImpl_Release(LPDIRECTINPUTDEVICE2A iface)
ULONG WINAPI IDirectInputDevice2AImpl_Release(LPDIRECTINPUTDEVICE8A iface)
{
ICOM_THIS(IDirectInputDevice2AImpl,iface);
This->ref--;
......@@ -323,7 +323,7 @@ ULONG WINAPI IDirectInputDevice2AImpl_Release(LPDIRECTINPUTDEVICE2A iface)
}
HRESULT WINAPI IDirectInputDevice2AImpl_QueryInterface(
LPDIRECTINPUTDEVICE2A iface,REFIID riid,LPVOID *ppobj
LPDIRECTINPUTDEVICE8A iface,REFIID riid,LPVOID *ppobj
)
{
ICOM_THIS(IDirectInputDevice2AImpl,iface);
......@@ -349,14 +349,14 @@ HRESULT WINAPI IDirectInputDevice2AImpl_QueryInterface(
}
ULONG WINAPI IDirectInputDevice2AImpl_AddRef(
LPDIRECTINPUTDEVICE2A iface)
LPDIRECTINPUTDEVICE8A iface)
{
ICOM_THIS(IDirectInputDevice2AImpl,iface);
return ++This->ref;
}
HRESULT WINAPI IDirectInputDevice2AImpl_EnumObjects(
LPDIRECTINPUTDEVICE2A iface,
LPDIRECTINPUTDEVICE8A iface,
LPDIENUMDEVICEOBJECTSCALLBACKA lpCallback,
LPVOID lpvRef,
DWORD dwFlags)
......@@ -372,7 +372,7 @@ HRESULT WINAPI IDirectInputDevice2AImpl_EnumObjects(
}
HRESULT WINAPI IDirectInputDevice2AImpl_GetProperty(
LPDIRECTINPUTDEVICE2A iface,
LPDIRECTINPUTDEVICE8A iface,
REFGUID rguid,
LPDIPROPHEADER pdiph)
{
......@@ -386,7 +386,7 @@ HRESULT WINAPI IDirectInputDevice2AImpl_GetProperty(
}
HRESULT WINAPI IDirectInputDevice2AImpl_GetObjectInfo(
LPDIRECTINPUTDEVICE2A iface,
LPDIRECTINPUTDEVICE8A iface,
LPDIDEVICEOBJECTINSTANCEA pdidoi,
DWORD dwObj,
DWORD dwHow)
......@@ -398,7 +398,7 @@ HRESULT WINAPI IDirectInputDevice2AImpl_GetObjectInfo(
}
HRESULT WINAPI IDirectInputDevice2AImpl_GetDeviceInfo(
LPDIRECTINPUTDEVICE2A iface,
LPDIRECTINPUTDEVICE8A iface,
LPDIDEVICEINSTANCEA pdidi)
{
FIXME("(this=%p,%p): stub!\n",
......@@ -408,7 +408,7 @@ HRESULT WINAPI IDirectInputDevice2AImpl_GetDeviceInfo(
}
HRESULT WINAPI IDirectInputDevice2AImpl_RunControlPanel(
LPDIRECTINPUTDEVICE2A iface,
LPDIRECTINPUTDEVICE8A iface,
HWND hwndOwner,
DWORD dwFlags)
{
......@@ -419,7 +419,7 @@ HRESULT WINAPI IDirectInputDevice2AImpl_RunControlPanel(
}
HRESULT WINAPI IDirectInputDevice2AImpl_Initialize(
LPDIRECTINPUTDEVICE2A iface,
LPDIRECTINPUTDEVICE8A iface,
HINSTANCE hinst,
DWORD dwVersion,
REFGUID rguid)
......@@ -434,7 +434,7 @@ HRESULT WINAPI IDirectInputDevice2AImpl_Initialize(
*/
HRESULT WINAPI IDirectInputDevice2AImpl_CreateEffect(
LPDIRECTINPUTDEVICE2A iface,
LPDIRECTINPUTDEVICE8A iface,
REFGUID rguid,
LPCDIEFFECT lpeff,
LPDIRECTINPUTEFFECT *ppdef,
......@@ -446,7 +446,7 @@ HRESULT WINAPI IDirectInputDevice2AImpl_CreateEffect(
}
HRESULT WINAPI IDirectInputDevice2AImpl_EnumEffects(
LPDIRECTINPUTDEVICE2A iface,
LPDIRECTINPUTDEVICE8A iface,
LPDIENUMEFFECTSCALLBACKA lpCallback,
LPVOID lpvRef,
DWORD dwFlags)
......@@ -460,7 +460,7 @@ HRESULT WINAPI IDirectInputDevice2AImpl_EnumEffects(
}
HRESULT WINAPI IDirectInputDevice2AImpl_GetEffectInfo(
LPDIRECTINPUTDEVICE2A iface,
LPDIRECTINPUTDEVICE8A iface,
LPDIEFFECTINFOA lpdei,
REFGUID rguid)
{
......@@ -470,7 +470,7 @@ HRESULT WINAPI IDirectInputDevice2AImpl_GetEffectInfo(
}
HRESULT WINAPI IDirectInputDevice2AImpl_GetForceFeedbackState(
LPDIRECTINPUTDEVICE2A iface,
LPDIRECTINPUTDEVICE8A iface,
LPDWORD pdwOut)
{
FIXME("(this=%p,%p): stub!\n",
......@@ -479,7 +479,7 @@ HRESULT WINAPI IDirectInputDevice2AImpl_GetForceFeedbackState(
}
HRESULT WINAPI IDirectInputDevice2AImpl_SendForceFeedbackCommand(
LPDIRECTINPUTDEVICE2A iface,
LPDIRECTINPUTDEVICE8A iface,
DWORD dwFlags)
{
FIXME("(this=%p,0x%08lx): stub!\n",
......@@ -488,7 +488,7 @@ HRESULT WINAPI IDirectInputDevice2AImpl_SendForceFeedbackCommand(
}
HRESULT WINAPI IDirectInputDevice2AImpl_EnumCreatedEffectObjects(
LPDIRECTINPUTDEVICE2A iface,
LPDIRECTINPUTDEVICE8A iface,
LPDIENUMCREATEDEFFECTOBJECTSCALLBACK lpCallback,
LPVOID lpvRef,
DWORD dwFlags)
......@@ -501,7 +501,7 @@ HRESULT WINAPI IDirectInputDevice2AImpl_EnumCreatedEffectObjects(
}
HRESULT WINAPI IDirectInputDevice2AImpl_Escape(
LPDIRECTINPUTDEVICE2A iface,
LPDIRECTINPUTDEVICE8A iface,
LPDIEFFESCAPE lpDIEEsc)
{
FIXME("(this=%p,%p): stub!\n",
......@@ -510,16 +510,16 @@ HRESULT WINAPI IDirectInputDevice2AImpl_Escape(
}
HRESULT WINAPI IDirectInputDevice2AImpl_Poll(
LPDIRECTINPUTDEVICE2A iface)
LPDIRECTINPUTDEVICE8A iface)
{
/* Because wine devices do not need to be polled, just return DI_NOEFFECT */
return DI_NOEFFECT;
}
HRESULT WINAPI IDirectInputDevice2AImpl_SendDeviceData(
LPDIRECTINPUTDEVICE2A iface,
LPDIRECTINPUTDEVICE8A iface,
DWORD cbObjectData,
LPDIDEVICEOBJECTDATA rgdod,
LPCDIDEVICEOBJECTDATA rgdod,
LPDWORD pdwInOut,
DWORD dwFlags)
{
......@@ -529,7 +529,7 @@ HRESULT WINAPI IDirectInputDevice2AImpl_SendDeviceData(
return DI_OK;
}
HRESULT WINAPI IDirectInputDevice7AImpl_EnumEffectsInFile(LPDIRECTINPUTDEVICE7A iface,
HRESULT WINAPI IDirectInputDevice7AImpl_EnumEffectsInFile(LPDIRECTINPUTDEVICE8A iface,
LPCSTR lpszFileName,
LPDIENUMEFFECTSINFILECALLBACK pec,
LPVOID pvRef,
......@@ -540,7 +540,7 @@ HRESULT WINAPI IDirectInputDevice7AImpl_EnumEffectsInFile(LPDIRECTINPUTDEVICE7A
return DI_OK;
}
HRESULT WINAPI IDirectInputDevice7AImpl_WriteEffectToFile(LPDIRECTINPUTDEVICE7A iface,
HRESULT WINAPI IDirectInputDevice7AImpl_WriteEffectToFile(LPDIRECTINPUTDEVICE8A iface,
LPCSTR lpszFileName,
DWORD dwEntries,
LPDIFILEEFFECT rgDiFileEft,
......@@ -550,3 +550,31 @@ HRESULT WINAPI IDirectInputDevice7AImpl_WriteEffectToFile(LPDIRECTINPUTDEVICE7A
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-2001 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
......@@ -78,88 +79,98 @@ extern void _dump_OBJECTINSTANCEA(DIDEVICEOBJECTINSTANCEA *ddoi) ;
/* And the stubs */
extern HRESULT WINAPI IDirectInputDevice2AImpl_SetDataFormat(
LPDIRECTINPUTDEVICE2A iface,LPCDIDATAFORMAT df ) ;
LPDIRECTINPUTDEVICE8A iface,LPCDIDATAFORMAT df ) ;
extern HRESULT WINAPI IDirectInputDevice2AImpl_SetCooperativeLevel(
LPDIRECTINPUTDEVICE2A iface,HWND hwnd,DWORD dwflags ) ;
LPDIRECTINPUTDEVICE8A iface,HWND hwnd,DWORD dwflags ) ;
extern HRESULT WINAPI IDirectInputDevice2AImpl_SetEventNotification(
LPDIRECTINPUTDEVICE2A iface,HANDLE hnd ) ;
extern ULONG WINAPI IDirectInputDevice2AImpl_Release(LPDIRECTINPUTDEVICE2A iface) ;
LPDIRECTINPUTDEVICE8A iface,HANDLE hnd ) ;
extern ULONG WINAPI IDirectInputDevice2AImpl_Release(LPDIRECTINPUTDEVICE8A iface) ;
extern HRESULT WINAPI IDirectInputDevice2AImpl_QueryInterface(
LPDIRECTINPUTDEVICE2A iface,REFIID riid,LPVOID *ppobj ) ;
LPDIRECTINPUTDEVICE8A iface,REFIID riid,LPVOID *ppobj ) ;
extern ULONG WINAPI IDirectInputDevice2AImpl_AddRef(
LPDIRECTINPUTDEVICE2A iface) ;
LPDIRECTINPUTDEVICE8A iface) ;
extern HRESULT WINAPI IDirectInputDevice2AImpl_EnumObjects(
LPDIRECTINPUTDEVICE2A iface,
LPDIRECTINPUTDEVICE8A iface,
LPDIENUMDEVICEOBJECTSCALLBACKA lpCallback,
LPVOID lpvRef,
DWORD dwFlags) ;
extern HRESULT WINAPI IDirectInputDevice2AImpl_GetProperty(
LPDIRECTINPUTDEVICE2A iface,
LPDIRECTINPUTDEVICE8A iface,
REFGUID rguid,
LPDIPROPHEADER pdiph) ;
extern HRESULT WINAPI IDirectInputDevice2AImpl_GetObjectInfo(
LPDIRECTINPUTDEVICE2A iface,
LPDIRECTINPUTDEVICE8A iface,
LPDIDEVICEOBJECTINSTANCEA pdidoi,
DWORD dwObj,
DWORD dwHow) ;
extern HRESULT WINAPI IDirectInputDevice2AImpl_GetDeviceInfo(
LPDIRECTINPUTDEVICE2A iface,
LPDIRECTINPUTDEVICE8A iface,
LPDIDEVICEINSTANCEA pdidi) ;
extern HRESULT WINAPI IDirectInputDevice2AImpl_RunControlPanel(
LPDIRECTINPUTDEVICE2A iface,
LPDIRECTINPUTDEVICE8A iface,
HWND hwndOwner,
DWORD dwFlags) ;
extern HRESULT WINAPI IDirectInputDevice2AImpl_Initialize(
LPDIRECTINPUTDEVICE2A iface,
LPDIRECTINPUTDEVICE8A iface,
HINSTANCE hinst,
DWORD dwVersion,
REFGUID rguid) ;
extern HRESULT WINAPI IDirectInputDevice2AImpl_CreateEffect(
LPDIRECTINPUTDEVICE2A iface,
LPDIRECTINPUTDEVICE8A iface,
REFGUID rguid,
LPCDIEFFECT lpeff,
LPDIRECTINPUTEFFECT *ppdef,
LPUNKNOWN pUnkOuter) ;
extern HRESULT WINAPI IDirectInputDevice2AImpl_EnumEffects(
LPDIRECTINPUTDEVICE2A iface,
LPDIRECTINPUTDEVICE8A iface,
LPDIENUMEFFECTSCALLBACKA lpCallback,
LPVOID lpvRef,
DWORD dwFlags) ;
extern HRESULT WINAPI IDirectInputDevice2AImpl_GetEffectInfo(
LPDIRECTINPUTDEVICE2A iface,
LPDIRECTINPUTDEVICE8A iface,
LPDIEFFECTINFOA lpdei,
REFGUID rguid) ;
extern HRESULT WINAPI IDirectInputDevice2AImpl_GetForceFeedbackState(
LPDIRECTINPUTDEVICE2A iface,
LPDIRECTINPUTDEVICE8A iface,
LPDWORD pdwOut) ;
extern HRESULT WINAPI IDirectInputDevice2AImpl_SendForceFeedbackCommand(
LPDIRECTINPUTDEVICE2A iface,
LPDIRECTINPUTDEVICE8A iface,
DWORD dwFlags) ;
extern HRESULT WINAPI IDirectInputDevice2AImpl_EnumCreatedEffectObjects(
LPDIRECTINPUTDEVICE2A iface,
LPDIRECTINPUTDEVICE8A iface,
LPDIENUMCREATEDEFFECTOBJECTSCALLBACK lpCallback,
LPVOID lpvRef,
DWORD dwFlags) ;
extern HRESULT WINAPI IDirectInputDevice2AImpl_Escape(
LPDIRECTINPUTDEVICE2A iface,
LPDIRECTINPUTDEVICE8A iface,
LPDIEFFESCAPE lpDIEEsc) ;
extern HRESULT WINAPI IDirectInputDevice2AImpl_Poll(
LPDIRECTINPUTDEVICE2A iface) ;
LPDIRECTINPUTDEVICE8A iface) ;
extern HRESULT WINAPI IDirectInputDevice2AImpl_SendDeviceData(
LPDIRECTINPUTDEVICE2A iface,
LPDIRECTINPUTDEVICE8A iface,
DWORD cbObjectData,
LPDIDEVICEOBJECTDATA rgdod,
LPCDIDEVICEOBJECTDATA rgdod,
LPDWORD pdwInOut,
DWORD dwFlags) ;
extern HRESULT WINAPI IDirectInputDevice7AImpl_EnumEffectsInFile(LPDIRECTINPUTDEVICE7A iface,
extern HRESULT WINAPI IDirectInputDevice7AImpl_EnumEffectsInFile(LPDIRECTINPUTDEVICE8A iface,
LPCSTR lpszFileName,
LPDIENUMEFFECTSINFILECALLBACK pec,
LPVOID pvRef,
DWORD dwFlags) ;
extern HRESULT WINAPI IDirectInputDevice7AImpl_WriteEffectToFile(LPDIRECTINPUTDEVICE7A iface,
extern HRESULT WINAPI IDirectInputDevice7AImpl_WriteEffectToFile(LPDIRECTINPUTDEVICE8A iface,
LPCSTR lpszFileName,
DWORD dwEntries,
LPDIFILEEFFECT rgDiFileEft,
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 */
......@@ -2,6 +2,7 @@
*
* Copyright 1998 Marcus Meissner
* Copyright 1998,1999 Lionel Ulmer
* Copyright 2000-2002 TransGaming Technologies Inc.
*
*
* This library is free software; you can redistribute it and/or
......@@ -26,10 +27,6 @@
* Doesn't get Input Focus.
*
* - 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"
......@@ -45,8 +42,8 @@
WINE_DEFAULT_DEBUG_CHANNEL(dinput);
static ICOM_VTABLE(IDirectInputA) ddiavt;
static ICOM_VTABLE(IDirectInput7A) ddi7avt;
static ICOM_VTABLE(IDirectInput8A) ddi8avt;
/* This array will be filled a dinput.so loading */
#define MAX_WINE_DINPUT_DEVICES 4
......@@ -103,19 +100,22 @@ HRESULT WINAPI DirectInputCreateEx(
TRACE("(0x%08lx,%04lx,%s,%p,%p)\n",
(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->lpVtbl = &ddi7avt;
This->ref = 1;
ICOM_VTBL(This) = &ddiavt;
*ppDI = This;
return DI_OK;
}
if (IsEqualGUID(&IID_IDirectInput7A,riid)) {
if (IsEqualGUID(&IID_IDirectInput8A,riid)) {
This = (IDirectInputAImpl*)HeapAlloc(GetProcessHeap(),0,sizeof(IDirectInputAImpl));
This->lpVtbl = &ddi8avt;
This->ref = 1;
ICOM_VTBL(This) = (ICOM_VTABLE(IDirectInputA) *) &ddi7avt;
*ppDI = This;
return DI_OK;
......@@ -134,10 +134,11 @@ HRESULT WINAPI DirectInputCreateA(HINSTANCE hinst, DWORD dwVersion, LPDIRECTINPU
(DWORD)hinst,dwVersion,ppDI,punkOuter
);
This = (IDirectInputAImpl*)HeapAlloc(GetProcessHeap(),0,sizeof(IDirectInputAImpl));
This->lpVtbl = &ddi7avt;
This->ref = 1;
ICOM_VTBL(This) = &ddiavt;
*ppDI=(IDirectInputA*)This;
return 0;
}
/******************************************************************************
* IDirectInputA_EnumDevices
......@@ -155,6 +156,7 @@ static HRESULT WINAPI IDirectInputAImpl_EnumDevices(
for (i = 0; i < nrof_dinput_devices; i++) {
if (dinput_devices[i]->enum_device(dwDevType, dwFlags, &devInstance)) {
devInstance.dwSize = sizeof(devInstance);
if (lpCallback(&devInstance,pvRef) == DIENUM_STOP)
return 0;
}
......@@ -163,6 +165,24 @@ static HRESULT WINAPI IDirectInputAImpl_EnumDevices(
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)
{
ICOM_THIS(IDirectInputAImpl,iface);
......@@ -202,26 +222,6 @@ static HRESULT WINAPI IDirectInputAImpl_CreateDevice(
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(
LPDIRECTINPUT7A iface,HINSTANCE hinst,DWORD x
) {
......@@ -246,7 +246,7 @@ static HRESULT WINAPI IDirectInputAImpl_RunControlPanel(LPDIRECTINPUT7A iface,
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) {
ICOM_THIS(IDirectInputAImpl,iface);
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
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__)
# define XCAST(fun) (typeof(ddiavt.fun))
# define XCAST(fun) (typeof(ddi7avt.fun))
#else
# define XCAST(fun) (void*)
#endif
static ICOM_VTABLE(IDirectInputA) ddiavt =
{
static ICOM_VTABLE(IDirectInput7A) ddi7avt = {
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
XCAST(QueryInterface)IDirectInputAImpl_QueryInterface,
XCAST(AddRef)IDirectInputAImpl_AddRef,
......@@ -292,19 +332,21 @@ static ICOM_VTABLE(IDirectInputA) ddiavt =
XCAST(EnumDevices)IDirectInputAImpl_EnumDevices,
XCAST(GetDeviceStatus)IDirectInputAImpl_GetDeviceStatus,
XCAST(RunControlPanel)IDirectInputAImpl_RunControlPanel,
XCAST(Initialize)IDirectInputAImpl_Initialize
XCAST(Initialize)IDirectInputAImpl_Initialize,
XCAST(FindDevice)IDirectInput2AImpl_FindDevice,
IDirectInput7AImpl_CreateDeviceEx
};
#undef XCAST
#if !defined(__STRICT_ANSI__) && defined(__GNUC__)
# define XCAST(fun) (typeof(ddi7avt.fun))
# define XCAST(fun) (typeof(ddi8avt.fun))
#else
# define XCAST(fun) (void*)
#endif
static ICOM_VTABLE(IDirectInput7A) ddi7avt = {
static ICOM_VTABLE(IDirectInput8A) ddi8avt = {
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
XCAST(QueryInterface)IDirectInputAImpl_QueryInterface,
XCAST(QueryInterface)IDirectInput8AImpl_QueryInterface,
XCAST(AddRef)IDirectInputAImpl_AddRef,
XCAST(Release)IDirectInputAImpl_Release,
XCAST(CreateDevice)IDirectInputAImpl_CreateDevice,
......@@ -313,7 +355,8 @@ static ICOM_VTABLE(IDirectInput7A) ddi7avt = {
XCAST(RunControlPanel)IDirectInputAImpl_RunControlPanel,
XCAST(Initialize)IDirectInputAImpl_Initialize,
XCAST(FindDevice)IDirectInput2AImpl_FindDevice,
IDirectInput7AImpl_CreateDeviceEx
IDirectInput8AImpl_EnumDevicesBySemantics,
IDirectInput8AImpl_ConfigureDevices
};
#undef XCAST
......
......@@ -26,7 +26,7 @@
typedef struct IDirectInputAImpl IDirectInputAImpl;
struct IDirectInputAImpl
{
ICOM_VFIELD(IDirectInputA);
LPVOID lpVtbl;
DWORD ref;
/* Used to have an unique sequence number for all the events */
......
......@@ -2,6 +2,7 @@
*
* Copyright 1998 Marcus Meissner
* Copyright 1998,1999 Lionel Ulmer
* Copyright 2000-2001 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
......@@ -35,14 +36,12 @@
WINE_DEFAULT_DEBUG_CHANNEL(dinput);
static ICOM_VTABLE(IDirectInputDevice2A) SysKeyboardAvt;
static ICOM_VTABLE(IDirectInputDevice7A) SysKeyboard7Avt;
static ICOM_VTABLE(IDirectInputDevice8A) SysKeyboardAvt;
typedef struct SysKeyboardAImpl SysKeyboardAImpl;
struct SysKeyboardAImpl
{
/* IDirectInputDevice2AImpl */
ICOM_VFIELD(IDirectInputDevice2A);
LPVOID lpVtbl;
DWORD ref;
GUID guid;
......@@ -151,12 +150,12 @@ static BOOL keyboarddev_enum_device(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEIN
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;
newDevice = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(SysKeyboardAImpl));
newDevice->lpVtbl = kvt;
newDevice->ref = 1;
ICOM_VTBL(newDevice) = kvt;
memcpy(&(newDevice->guid),rguid,sizeof(*rguid));
newDevice->dinput = dinput;
......@@ -168,16 +167,14 @@ static HRESULT keyboarddev_create_device(IDirectInputAImpl *dinput, REFGUID rgui
{
if ((IsEqualGUID(&GUID_SysKeyboard,rguid)) || /* Generic 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);
TRACE("Creating a Keyboard device (%p)\n", *pdev);
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
return DIERR_NOINTERFACE;
}
......@@ -194,7 +191,7 @@ static dinput_device keyboarddev = {
DECL_GLOBAL_CONSTRUCTOR(keyboarddev_register) { dinput_register_device(&keyboarddev); }
static HRESULT WINAPI SysKeyboardAImpl_SetProperty(
LPDIRECTINPUTDEVICE2A iface,REFGUID rguid,LPCDIPROPHEADER ph
LPDIRECTINPUTDEVICE8A iface,REFGUID rguid,LPCDIPROPHEADER ph
)
{
ICOM_THIS(SysKeyboardAImpl,iface);
......@@ -225,7 +222,7 @@ static HRESULT WINAPI SysKeyboardAImpl_SetProperty(
}
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 */
......@@ -237,7 +234,7 @@ static HRESULT WINAPI SysKeyboardAImpl_GetDeviceState(
}
static HRESULT WINAPI SysKeyboardAImpl_GetDeviceData(
LPDIRECTINPUTDEVICE2A iface,DWORD dodsize,LPDIDEVICEOBJECTDATA dod,
LPDIRECTINPUTDEVICE8A iface,DWORD dodsize,LPDIDEVICEOBJECTDATA dod,
LPDWORD entries,DWORD flags
)
{
......@@ -289,9 +286,9 @@ static HRESULT WINAPI SysKeyboardAImpl_GetDeviceData(
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);
......@@ -325,7 +322,7 @@ static HRESULT WINAPI SysKeyboardAImpl_Acquire(LPDIRECTINPUTDEVICE2A iface)
return DI_OK;
}
static HRESULT WINAPI SysKeyboardAImpl_Unacquire(LPDIRECTINPUTDEVICE2A iface)
static HRESULT WINAPI SysKeyboardAImpl_Unacquire(LPDIRECTINPUTDEVICE8A iface)
{
ICOM_THIS(SysKeyboardAImpl,iface);
TRACE("(this=%p)\n",This);
......@@ -350,7 +347,7 @@ static HRESULT WINAPI SysKeyboardAImpl_Unacquire(LPDIRECTINPUTDEVICE2A iface)
return DI_OK;
}
static HRESULT WINAPI SysKeyboardAImpl_SetEventNotification(LPDIRECTINPUTDEVICE2A iface,
static HRESULT WINAPI SysKeyboardAImpl_SetEventNotification(LPDIRECTINPUTDEVICE8A iface,
HANDLE hnd) {
ICOM_THIS(SysKeyboardAImpl,iface);
......@@ -364,7 +361,7 @@ static HRESULT WINAPI SysKeyboardAImpl_SetEventNotification(LPDIRECTINPUTDEVICE2
* GetCapabilities : get the device capablitites
*/
static HRESULT WINAPI SysKeyboardAImpl_GetCapabilities(
LPDIRECTINPUTDEVICE2A iface,
LPDIRECTINPUTDEVICE8A iface,
LPDIDEVCAPS lpDIDevCaps)
{
ICOM_THIS(SysKeyboardAImpl,iface);
......@@ -390,7 +387,7 @@ static HRESULT WINAPI SysKeyboardAImpl_GetCapabilities(
return DI_OK;
}
static ICOM_VTABLE(IDirectInputDevice2A) SysKeyboardAvt =
static ICOM_VTABLE(IDirectInputDevice8A) SysKeyboardAvt =
{
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
IDirectInputDevice2AImpl_QueryInterface,
......@@ -419,47 +416,10 @@ static ICOM_VTABLE(IDirectInputDevice2A) SysKeyboardAvt =
IDirectInputDevice2AImpl_EnumCreatedEffectObjects,
IDirectInputDevice2AImpl_Escape,
IDirectInputDevice2AImpl_Poll,
IDirectInputDevice2AImpl_SendDeviceData
};
#if !defined(__STRICT_ANSI__) && defined(__GNUC__)
# define XCAST(fun) (typeof(SysKeyboard7Avt.fun))
#else
# 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,
IDirectInputDevice2AImpl_SendDeviceData,
IDirectInputDevice7AImpl_EnumEffectsInFile,
IDirectInputDevice7AImpl_WriteEffectToFile
IDirectInputDevice7AImpl_WriteEffectToFile,
IDirectInputDevice8AImpl_BuildActionMap,
IDirectInputDevice8AImpl_SetActionMap,
IDirectInputDevice8AImpl_GetImageInfo
};
#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
typedef HRESULT (CALLBACK *LPD3DENUMTEXTUREFORMATSCALLBACK)(LPDDSURFACEDESC lpDdsd, LPVOID lpContext);
typedef HRESULT (CALLBACK *LPD3DENUMPIXELFORMATSCALLBACK)(LPDDPIXELFORMAT lpDDPixFmt, LPVOID lpContext);
#ifndef D3DCOLOR_DEFINED
typedef DWORD D3DCOLOR, *LPD3DCOLOR;
#define D3DCOLOR_DEFINED
#endif
typedef DWORD D3DMATERIALHANDLE, *LPD3DMATERIALHANDLE;
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