CVS: winex/dlls/dinput thunks.c,1.8,1.9
[email protected] 31 Jul 2007 19:55:14 -0000
| Newsgroups | gmane.comp.emulators.winex.cvs |
|---|---|
| Message-ID | <[email protected]> |
Subject: winex/dlls/dinput thunks.c,1.8,1.9Update of /var/lib/cvsd/cvsroot/winex/dlls/dinput
In directory agravaine:/tmp/cvs-serv1675/dlls/dinput
Modified Files:
thunks.c
Log Message:
- support GetObjectInfo on our unicode device thunks
Index: thunks.c
===================================================================
RCS file: /var/lib/cvsd/cvsroot/winex/dlls/dinput/thunks.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- thunks.c 18 Feb 2004 22:27:38 -0000 1.8
+++ thunks.c 31 Jul 2007 19:55:12 -0000 1.9
@@ -213,10 +213,40 @@
DWORD dwObj,
DWORD dwHow)
{
- FIXME("(this=%p,%p,%ld,0x%08lx): stub!\n",
- iface, pdidoi, dwObj, dwHow);
+ DIDEVICEOBJECTINSTANCEA DOI;
+ HRESULT Ret;
+ ICOM_THIS (DeviceThunkWImpl, iface);
- return DI_OK;
+ TRACE("(this=%p,%p,%ld,0x%08lx)\n", iface, pdidoi, dwObj, dwHow);
+
+ memset (&DOI, 0, sizeof (DOI));
+ DOI.dwSize = sizeof (DOI);
+
+ Ret = IDirectInputDevice8_GetObjectInfo (This->dev, &DOI, dwObj, dwHow);
+ if (Ret != DI_OK)
+ return Ret;
+
+ memcpy (&pdidoi->guidType, &DOI.guidType, sizeof (GUID));
+ pdidoi->dwOfs = DOI.dwOfs;
+ pdidoi->dwType = DOI.dwType;
+ pdidoi->dwFlags = DOI.dwFlags;
+ MultiByteToWideChar (CP_ACP, 0, DOI.tszName, -1, pdidoi->tszName, MAX_PATH);
+
+ /* Check size to handle earlier versions of dinput */
+ if (pdidoi->dwSize >= sizeof (*pdidoi))
+ {
+ pdidoi->dwFFMaxForce = DOI.dwFFMaxForce;
+ pdidoi->dwFFForceResolution = DOI.dwFFForceResolution;
+ pdidoi->wCollectionNumber = DOI.wCollectionNumber;
+ pdidoi->wDesignatorIndex = DOI.wDesignatorIndex;
+ pdidoi->wUsagePage = DOI.wUsagePage;
+ pdidoi->wUsage = DOI.wUsage;
+ pdidoi->dwDimension = DOI.dwDimension;
+ pdidoi->wExponent = DOI.wExponent;
+ pdidoi->wReserved = DOI.wReserved;
+ }
+
+ return DI_OK;
}
static HRESULT WINAPI DeviceThunkWImpl_GetDeviceInfo(