dinput: Win64 printf format warning fixes.
This commit is contained in:
parent
e5c1a014df
commit
7123f3e80e
|
@ -6,7 +6,6 @@ MODULE = dinput.dll
|
|||
IMPORTLIB = libdinput.$(IMPLIBEXT)
|
||||
IMPORTS = ole32 user32 advapi32 kernel32
|
||||
EXTRALIBS = -ldxguid -luuid
|
||||
EXTRADEFS = -DWINE_NO_LONG_AS_INT
|
||||
|
||||
C_SRCS = \
|
||||
data_formats.c \
|
||||
|
|
|
@ -102,21 +102,21 @@ void _dump_EnumObjects_flags(DWORD dwFlags) {
|
|||
}
|
||||
}
|
||||
if (type) {
|
||||
DPRINTF(" (unhandled: %08lx)", type);
|
||||
DPRINTF(" (unhandled: %08x)", type);
|
||||
}
|
||||
}
|
||||
DPRINTF(" / Instance: ");
|
||||
if (instance == ((DIDFT_ANYINSTANCE >> 8) & 0xFFFF)) {
|
||||
DPRINTF("DIDFT_ANYINSTANCE");
|
||||
} else {
|
||||
DPRINTF("%3ld", instance);
|
||||
DPRINTF("%3d", instance);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void _dump_DIPROPHEADER(LPCDIPROPHEADER diph) {
|
||||
if (TRACE_ON(dinput)) {
|
||||
DPRINTF(" - dwObj = 0x%08lx\n", diph->dwObj);
|
||||
DPRINTF(" - dwObj = 0x%08x\n", diph->dwObj);
|
||||
DPRINTF(" - dwHow = %s\n",
|
||||
((diph->dwHow == DIPH_DEVICE) ? "DIPH_DEVICE" :
|
||||
((diph->dwHow == DIPH_BYOFFSET) ? "DIPH_BYOFFSET" :
|
||||
|
@ -126,14 +126,14 @@ void _dump_DIPROPHEADER(LPCDIPROPHEADER diph) {
|
|||
|
||||
void _dump_OBJECTINSTANCEA(DIDEVICEOBJECTINSTANCEA *ddoi) {
|
||||
if (TRACE_ON(dinput)) {
|
||||
DPRINTF(" - enumerating : %s ('%s') - %2ld - 0x%08lx - %s\n",
|
||||
DPRINTF(" - enumerating : %s ('%s') - %2d - 0x%08x - %s\n",
|
||||
debugstr_guid(&ddoi->guidType), _dump_dinput_GUID(&ddoi->guidType), ddoi->dwOfs, ddoi->dwType, ddoi->tszName);
|
||||
}
|
||||
}
|
||||
|
||||
void _dump_OBJECTINSTANCEW(DIDEVICEOBJECTINSTANCEW *ddoi) {
|
||||
if (TRACE_ON(dinput)) {
|
||||
DPRINTF(" - enumerating : %s ('%s'), - %2ld - 0x%08lx - %s\n",
|
||||
DPRINTF(" - enumerating : %s ('%s'), - %2d - 0x%08x - %s\n",
|
||||
debugstr_guid(&ddoi->guidType), _dump_dinput_GUID(&ddoi->guidType), ddoi->dwOfs, ddoi->dwType, debugstr_w(ddoi->tszName));
|
||||
}
|
||||
}
|
||||
|
@ -188,31 +188,31 @@ void _dump_DIDATAFORMAT(const DIDATAFORMAT *df) {
|
|||
unsigned int i;
|
||||
|
||||
TRACE("Dumping DIDATAFORMAT structure:\n");
|
||||
TRACE(" - dwSize: %ld\n", df->dwSize);
|
||||
TRACE(" - dwSize: %d\n", df->dwSize);
|
||||
if (df->dwSize != sizeof(DIDATAFORMAT)) {
|
||||
WARN("Non-standard DIDATAFORMAT structure size %ld\n", df->dwSize);
|
||||
WARN("Non-standard DIDATAFORMAT structure size %d\n", df->dwSize);
|
||||
}
|
||||
TRACE(" - dwObjsize: %ld\n", df->dwObjSize);
|
||||
TRACE(" - dwObjsize: %d\n", df->dwObjSize);
|
||||
if (df->dwObjSize != sizeof(DIOBJECTDATAFORMAT)) {
|
||||
WARN("Non-standard DIOBJECTDATAFORMAT structure size %ld\n", df->dwObjSize);
|
||||
WARN("Non-standard DIOBJECTDATAFORMAT structure size %d\n", df->dwObjSize);
|
||||
}
|
||||
TRACE(" - dwFlags: 0x%08lx (", df->dwFlags);
|
||||
TRACE(" - dwFlags: 0x%08x (", df->dwFlags);
|
||||
switch (df->dwFlags) {
|
||||
case DIDF_ABSAXIS: TRACE("DIDF_ABSAXIS"); break;
|
||||
case DIDF_RELAXIS: TRACE("DIDF_RELAXIS"); break;
|
||||
default: TRACE("unknown"); break;
|
||||
}
|
||||
TRACE(")\n");
|
||||
TRACE(" - dwDataSize: %ld\n", df->dwDataSize);
|
||||
TRACE(" - dwNumObjs: %ld\n", df->dwNumObjs);
|
||||
TRACE(" - dwDataSize: %d\n", df->dwDataSize);
|
||||
TRACE(" - dwNumObjs: %d\n", df->dwNumObjs);
|
||||
|
||||
for (i = 0; i < df->dwNumObjs; i++) {
|
||||
TRACE(" - Object %d:\n", i);
|
||||
TRACE(" * GUID: %s ('%s')\n", debugstr_guid(df->rgodf[i].pguid), _dump_dinput_GUID(df->rgodf[i].pguid));
|
||||
TRACE(" * dwOfs: %ld\n", df->rgodf[i].dwOfs);
|
||||
TRACE(" * dwType: 0x%08lx\n", df->rgodf[i].dwType);
|
||||
TRACE(" * dwOfs: %d\n", df->rgodf[i].dwOfs);
|
||||
TRACE(" * dwType: 0x%08x\n", df->rgodf[i].dwType);
|
||||
TRACE(" "); _dump_EnumObjects_flags(df->rgodf[i].dwType); TRACE("\n");
|
||||
TRACE(" * dwFlags: 0x%08lx\n", df->rgodf[i].dwFlags);
|
||||
TRACE(" * dwFlags: 0x%08x\n", df->rgodf[i].dwFlags);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -336,16 +336,16 @@ DataFormat *create_DataFormat(const DIDATAFORMAT *wine_format, LPCDIDATAFORMAT a
|
|||
TRACE(" * GUID: %s ('%s')\n",
|
||||
debugstr_guid(asked_format->rgodf[j].pguid),
|
||||
_dump_dinput_GUID(asked_format->rgodf[j].pguid));
|
||||
TRACE(" * Offset: %3ld\n", asked_format->rgodf[j].dwOfs);
|
||||
TRACE(" * dwType: %08lx\n", asked_format->rgodf[j].dwType);
|
||||
TRACE(" * Offset: %3d\n", asked_format->rgodf[j].dwOfs);
|
||||
TRACE(" * dwType: %08x\n", asked_format->rgodf[j].dwType);
|
||||
TRACE(" "); _dump_EnumObjects_flags(asked_format->rgodf[j].dwType); TRACE("\n");
|
||||
|
||||
TRACE(" - Wine (%d) :\n", i);
|
||||
TRACE(" * GUID: %s ('%s')\n",
|
||||
debugstr_guid(wine_format->rgodf[i].pguid),
|
||||
_dump_dinput_GUID(wine_format->rgodf[i].pguid));
|
||||
TRACE(" * Offset: %3ld\n", wine_format->rgodf[i].dwOfs);
|
||||
TRACE(" * dwType: %08lx\n", wine_format->rgodf[i].dwType);
|
||||
TRACE(" * Offset: %3d\n", wine_format->rgodf[i].dwOfs);
|
||||
TRACE(" * dwType: %08x\n", wine_format->rgodf[i].dwType);
|
||||
TRACE(" "); _dump_EnumObjects_flags(wine_format->rgodf[i].dwType); TRACE("\n");
|
||||
|
||||
if (wine_format->rgodf[i].dwType & DIDFT_BUTTON)
|
||||
|
@ -354,7 +354,7 @@ DataFormat *create_DataFormat(const DIDATAFORMAT *wine_format, LPCDIDATAFORMAT a
|
|||
dt[index].size = sizeof(DWORD);
|
||||
dt[index].offset_in = wine_format->rgodf[i].dwOfs;
|
||||
if (asked_format->rgodf[j].dwOfs < next) {
|
||||
WARN("bad format: dwOfs=%ld, changing to %ld\n", asked_format->rgodf[j].dwOfs, next);
|
||||
WARN("bad format: dwOfs=%d, changing to %d\n", asked_format->rgodf[j].dwOfs, next);
|
||||
dt[index].offset_out = next;
|
||||
offset[i] = next;
|
||||
} else {
|
||||
|
@ -383,8 +383,8 @@ DataFormat *create_DataFormat(const DIDATAFORMAT *wine_format, LPCDIDATAFORMAT a
|
|||
TRACE(" * GUID: %s ('%s')\n",
|
||||
debugstr_guid(asked_format->rgodf[j].pguid),
|
||||
_dump_dinput_GUID(asked_format->rgodf[j].pguid));
|
||||
TRACE(" * Offset: %3ld\n", asked_format->rgodf[j].dwOfs);
|
||||
TRACE(" * dwType: %08lx\n", asked_format->rgodf[j].dwType);
|
||||
TRACE(" * Offset: %3d\n", asked_format->rgodf[j].dwOfs);
|
||||
TRACE(" * dwType: %08x\n", asked_format->rgodf[j].dwType);
|
||||
TRACE(" "); _dump_EnumObjects_flags(asked_format->rgodf[j].dwType); TRACE("\n");
|
||||
|
||||
if (asked_format->rgodf[j].dwType & DIDFT_BUTTON)
|
||||
|
@ -467,7 +467,7 @@ HRESULT WINAPI IDirectInputDevice2AImpl_SetCooperativeLevel(
|
|||
LPDIRECTINPUTDEVICE8A iface,HWND hwnd,DWORD dwflags
|
||||
) {
|
||||
IDirectInputDevice2AImpl *This = (IDirectInputDevice2AImpl *)iface;
|
||||
TRACE("(this=%p,%p,0x%08lx)\n",This,hwnd,dwflags);
|
||||
TRACE("(this=%p,%p,0x%08x)\n", This, hwnd, dwflags);
|
||||
if (TRACE_ON(dinput)) {
|
||||
TRACE(" cooperative level : ");
|
||||
_dump_cooperativelevel_DI(dwflags);
|
||||
|
@ -578,7 +578,7 @@ HRESULT WINAPI IDirectInputDevice2AImpl_EnumObjects(
|
|||
LPVOID lpvRef,
|
||||
DWORD dwFlags)
|
||||
{
|
||||
FIXME("(this=%p,%p,%p,%08lx): stub!\n", iface, lpCallback, lpvRef, dwFlags);
|
||||
FIXME("(this=%p,%p,%p,%08x): stub!\n", iface, lpCallback, lpvRef, dwFlags);
|
||||
if (TRACE_ON(dinput)) {
|
||||
DPRINTF(" - flags = ");
|
||||
_dump_EnumObjects_flags(dwFlags);
|
||||
|
@ -594,7 +594,7 @@ HRESULT WINAPI IDirectInputDevice2WImpl_EnumObjects(
|
|||
LPVOID lpvRef,
|
||||
DWORD dwFlags)
|
||||
{
|
||||
FIXME("(this=%p,%p,%p,%08lx): stub!\n", iface, lpCallback, lpvRef, dwFlags);
|
||||
FIXME("(this=%p,%p,%p,%08x): stub!\n", iface, lpCallback, lpvRef, dwFlags);
|
||||
if (TRACE_ON(dinput)) {
|
||||
DPRINTF(" - flags = ");
|
||||
_dump_EnumObjects_flags(dwFlags);
|
||||
|
@ -624,7 +624,7 @@ HRESULT WINAPI IDirectInputDevice2AImpl_GetObjectInfo(
|
|||
DWORD dwObj,
|
||||
DWORD dwHow)
|
||||
{
|
||||
FIXME("(this=%p,%p,%ld,0x%08lx): stub!\n",
|
||||
FIXME("(this=%p,%p,%d,0x%08x): stub!\n",
|
||||
iface, pdidoi, dwObj, dwHow);
|
||||
|
||||
return DI_OK;
|
||||
|
@ -636,7 +636,7 @@ HRESULT WINAPI IDirectInputDevice2WImpl_GetObjectInfo(
|
|||
DWORD dwObj,
|
||||
DWORD dwHow)
|
||||
{
|
||||
FIXME("(this=%p,%p,%ld,0x%08lx): stub!\n",
|
||||
FIXME("(this=%p,%p,%d,0x%08x): stub!\n",
|
||||
iface, pdidoi, dwObj, dwHow);
|
||||
|
||||
return DI_OK;
|
||||
|
@ -667,7 +667,7 @@ HRESULT WINAPI IDirectInputDevice2AImpl_RunControlPanel(
|
|||
HWND hwndOwner,
|
||||
DWORD dwFlags)
|
||||
{
|
||||
FIXME("(this=%p,%p,0x%08lx): stub!\n",
|
||||
FIXME("(this=%p,%p,0x%08x): stub!\n",
|
||||
iface, hwndOwner, dwFlags);
|
||||
|
||||
return DI_OK;
|
||||
|
@ -679,7 +679,7 @@ HRESULT WINAPI IDirectInputDevice2AImpl_Initialize(
|
|||
DWORD dwVersion,
|
||||
REFGUID rguid)
|
||||
{
|
||||
FIXME("(this=%p,%p,%ld,%s): stub!\n",
|
||||
FIXME("(this=%p,%p,%d,%s): stub!\n",
|
||||
iface, hinst, dwVersion, debugstr_guid(rguid));
|
||||
return DI_OK;
|
||||
}
|
||||
|
@ -706,7 +706,7 @@ HRESULT WINAPI IDirectInputDevice2AImpl_EnumEffects(
|
|||
LPVOID lpvRef,
|
||||
DWORD dwFlags)
|
||||
{
|
||||
FIXME("(this=%p,%p,%p,0x%08lx): stub!\n",
|
||||
FIXME("(this=%p,%p,%p,0x%08x): stub!\n",
|
||||
iface, lpCallback, lpvRef, dwFlags);
|
||||
|
||||
return DI_OK;
|
||||
|
@ -718,7 +718,7 @@ HRESULT WINAPI IDirectInputDevice2WImpl_EnumEffects(
|
|||
LPVOID lpvRef,
|
||||
DWORD dwFlags)
|
||||
{
|
||||
FIXME("(this=%p,%p,%p,0x%08lx): stub!\n",
|
||||
FIXME("(this=%p,%p,%p,0x%08x): stub!\n",
|
||||
iface, lpCallback, lpvRef, dwFlags);
|
||||
|
||||
return DI_OK;
|
||||
|
@ -757,7 +757,7 @@ HRESULT WINAPI IDirectInputDevice2AImpl_SendForceFeedbackCommand(
|
|||
LPDIRECTINPUTDEVICE8A iface,
|
||||
DWORD dwFlags)
|
||||
{
|
||||
FIXME("(this=%p,0x%08lx): stub!\n",
|
||||
FIXME("(this=%p,0x%08x): stub!\n",
|
||||
iface, dwFlags);
|
||||
return DI_OK;
|
||||
}
|
||||
|
@ -768,7 +768,7 @@ HRESULT WINAPI IDirectInputDevice2AImpl_EnumCreatedEffectObjects(
|
|||
LPVOID lpvRef,
|
||||
DWORD dwFlags)
|
||||
{
|
||||
FIXME("(this=%p,%p,%p,0x%08lx): stub!\n",
|
||||
FIXME("(this=%p,%p,%p,0x%08x): stub!\n",
|
||||
iface, lpCallback, lpvRef, dwFlags);
|
||||
return DI_OK;
|
||||
}
|
||||
|
@ -796,7 +796,7 @@ HRESULT WINAPI IDirectInputDevice2AImpl_SendDeviceData(
|
|||
LPDWORD pdwInOut,
|
||||
DWORD dwFlags)
|
||||
{
|
||||
FIXME("(this=%p,0x%08lx,%p,%p,0x%08lx): stub!\n",
|
||||
FIXME("(this=%p,0x%08x,%p,%p,0x%08x): stub!\n",
|
||||
iface, cbObjectData, rgdod, pdwInOut, dwFlags);
|
||||
|
||||
return DI_OK;
|
||||
|
@ -808,7 +808,7 @@ HRESULT WINAPI IDirectInputDevice7AImpl_EnumEffectsInFile(LPDIRECTINPUTDEVICE8A
|
|||
LPVOID pvRef,
|
||||
DWORD dwFlags)
|
||||
{
|
||||
FIXME("(%p)->(%s,%p,%p,%08lx): stub !\n", iface, lpszFileName, pec, pvRef, dwFlags);
|
||||
FIXME("(%p)->(%s,%p,%p,%08x): stub !\n", iface, lpszFileName, pec, pvRef, dwFlags);
|
||||
|
||||
return DI_OK;
|
||||
}
|
||||
|
@ -819,7 +819,7 @@ HRESULT WINAPI IDirectInputDevice7WImpl_EnumEffectsInFile(LPDIRECTINPUTDEVICE8W
|
|||
LPVOID pvRef,
|
||||
DWORD dwFlags)
|
||||
{
|
||||
FIXME("(%p)->(%s,%p,%p,%08lx): stub !\n", iface, debugstr_w(lpszFileName), pec, pvRef, dwFlags);
|
||||
FIXME("(%p)->(%s,%p,%p,%08x): stub !\n", iface, debugstr_w(lpszFileName), pec, pvRef, dwFlags);
|
||||
|
||||
return DI_OK;
|
||||
}
|
||||
|
@ -830,7 +830,7 @@ HRESULT WINAPI IDirectInputDevice7AImpl_WriteEffectToFile(LPDIRECTINPUTDEVICE8A
|
|||
LPDIFILEEFFECT rgDiFileEft,
|
||||
DWORD dwFlags)
|
||||
{
|
||||
FIXME("(%p)->(%s,%08lx,%p,%08lx): stub !\n", iface, lpszFileName, dwEntries, rgDiFileEft, dwFlags);
|
||||
FIXME("(%p)->(%s,%08x,%p,%08x): stub !\n", iface, lpszFileName, dwEntries, rgDiFileEft, dwFlags);
|
||||
|
||||
return DI_OK;
|
||||
}
|
||||
|
@ -841,7 +841,7 @@ HRESULT WINAPI IDirectInputDevice7WImpl_WriteEffectToFile(LPDIRECTINPUTDEVICE8W
|
|||
LPDIFILEEFFECT rgDiFileEft,
|
||||
DWORD dwFlags)
|
||||
{
|
||||
FIXME("(%p)->(%s,%08lx,%p,%08lx): stub !\n", iface, debugstr_w(lpszFileName), dwEntries, rgDiFileEft, dwFlags);
|
||||
FIXME("(%p)->(%s,%08x,%p,%08x): stub !\n", iface, debugstr_w(lpszFileName), dwEntries, rgDiFileEft, dwFlags);
|
||||
|
||||
return DI_OK;
|
||||
}
|
||||
|
@ -851,7 +851,7 @@ HRESULT WINAPI IDirectInputDevice8AImpl_BuildActionMap(LPDIRECTINPUTDEVICE8A ifa
|
|||
LPCSTR lpszUserName,
|
||||
DWORD dwFlags)
|
||||
{
|
||||
FIXME("(%p)->(%p,%s,%08lx): stub !\n", iface, lpdiaf, lpszUserName, dwFlags);
|
||||
FIXME("(%p)->(%p,%s,%08x): stub !\n", iface, lpdiaf, lpszUserName, dwFlags);
|
||||
|
||||
return DI_OK;
|
||||
}
|
||||
|
@ -861,7 +861,7 @@ HRESULT WINAPI IDirectInputDevice8WImpl_BuildActionMap(LPDIRECTINPUTDEVICE8W ifa
|
|||
LPCWSTR lpszUserName,
|
||||
DWORD dwFlags)
|
||||
{
|
||||
FIXME("(%p)->(%p,%s,%08lx): stub !\n", iface, lpdiaf, debugstr_w(lpszUserName), dwFlags);
|
||||
FIXME("(%p)->(%p,%s,%08x): stub !\n", iface, lpdiaf, debugstr_w(lpszUserName), dwFlags);
|
||||
|
||||
return DI_OK;
|
||||
}
|
||||
|
@ -871,7 +871,7 @@ HRESULT WINAPI IDirectInputDevice8AImpl_SetActionMap(LPDIRECTINPUTDEVICE8A iface
|
|||
LPCSTR lpszUserName,
|
||||
DWORD dwFlags)
|
||||
{
|
||||
FIXME("(%p)->(%p,%s,%08lx): stub !\n", iface, lpdiaf, lpszUserName, dwFlags);
|
||||
FIXME("(%p)->(%p,%s,%08x): stub !\n", iface, lpdiaf, lpszUserName, dwFlags);
|
||||
|
||||
return DI_OK;
|
||||
}
|
||||
|
@ -881,7 +881,7 @@ HRESULT WINAPI IDirectInputDevice8WImpl_SetActionMap(LPDIRECTINPUTDEVICE8W iface
|
|||
LPCWSTR lpszUserName,
|
||||
DWORD dwFlags)
|
||||
{
|
||||
FIXME("(%p)->(%p,%s,%08lx): stub !\n", iface, lpdiaf, debugstr_w(lpszUserName), dwFlags);
|
||||
FIXME("(%p)->(%p,%s,%08x): stub !\n", iface, lpdiaf, debugstr_w(lpszUserName), dwFlags);
|
||||
|
||||
return DI_OK;
|
||||
}
|
||||
|
|
|
@ -90,7 +90,7 @@ HRESULT WINAPI DirectInputCreateEx(
|
|||
HRESULT res = DIERR_OLDDIRECTINPUTVERSION;
|
||||
LPCVOID vtable = NULL;
|
||||
|
||||
TRACE("(%p,%04lx,%s,%p,%p)\n", hinst,dwVersion,debugstr_guid(riid),ppDI,punkOuter);
|
||||
TRACE("(%p,%04x,%s,%p,%p)\n", hinst, dwVersion, debugstr_guid(riid), ppDI, punkOuter);
|
||||
|
||||
if (IsEqualGUID(&IID_IDirectInputA,riid) ||
|
||||
IsEqualGUID(&IID_IDirectInput2A,riid) ||
|
||||
|
@ -196,7 +196,7 @@ static HRESULT WINAPI IDirectInputAImpl_EnumDevices(
|
|||
DIDEVICEINSTANCEA devInstance;
|
||||
int i, j, r;
|
||||
|
||||
TRACE("(this=%p,0x%04lx '%s',%p,%p,%04lx)\n",
|
||||
TRACE("(this=%p,0x%04x '%s',%p,%p,%04x)\n",
|
||||
This, dwDevType, _dump_DIDEVTYPE_value(dwDevType),
|
||||
lpCallback, pvRef, dwFlags);
|
||||
TRACE(" flags: "); _dump_EnumDevices_dwFlags(dwFlags); TRACE("\n");
|
||||
|
@ -226,7 +226,7 @@ static HRESULT WINAPI IDirectInputWImpl_EnumDevices(
|
|||
DIDEVICEINSTANCEW devInstance;
|
||||
int i, j, r;
|
||||
|
||||
TRACE("(this=%p,0x%04lx '%s',%p,%p,%04lx)\n",
|
||||
TRACE("(this=%p,0x%04x '%s',%p,%p,%04x)\n",
|
||||
This, dwDevType, _dump_DIDEVTYPE_value(dwDevType),
|
||||
lpCallback, pvRef, dwFlags);
|
||||
TRACE(" flags: "); _dump_EnumDevices_dwFlags(dwFlags); TRACE("\n");
|
||||
|
@ -354,7 +354,7 @@ static HRESULT WINAPI IDirectInputWImpl_CreateDevice(LPDIRECTINPUT7W iface,
|
|||
}
|
||||
|
||||
static HRESULT WINAPI IDirectInputAImpl_Initialize(LPDIRECTINPUT7A iface, HINSTANCE hinst, DWORD x) {
|
||||
TRACE("(this=%p,%p,%lx)\n",iface, hinst, x);
|
||||
TRACE("(this=%p,%p,%x)\n",iface, hinst, x);
|
||||
|
||||
/* Initialize can return: DIERR_BETADIRECTINPUTVERSION, DIERR_OLDDIRECTINPUTVERSION and DI_OK.
|
||||
* Since we already initialized the device, return DI_OK. In the past we returned DIERR_ALREADYINITIALIZED
|
||||
|
@ -376,7 +376,7 @@ static HRESULT WINAPI IDirectInputAImpl_RunControlPanel(LPDIRECTINPUT7A iface,
|
|||
HWND hwndOwner,
|
||||
DWORD dwFlags) {
|
||||
IDirectInputImpl *This = (IDirectInputImpl *)iface;
|
||||
FIXME("(%p)->(%p,%08lx): stub\n",This, hwndOwner, dwFlags);
|
||||
FIXME("(%p)->(%p,%08x): stub\n",This, hwndOwner, dwFlags);
|
||||
|
||||
return DI_OK;
|
||||
}
|
||||
|
@ -479,7 +479,7 @@ static HRESULT WINAPI IDirectInput8AImpl_EnumDevicesBySemantics(
|
|||
{
|
||||
IDirectInputImpl *This = (IDirectInputImpl *)iface;
|
||||
|
||||
FIXME("(this=%p,%s,%p,%p,%p,%04lx): stub\n", This, ptszUserName, lpdiActionFormat,
|
||||
FIXME("(this=%p,%s,%p,%p,%p,%04x): stub\n", This, ptszUserName, lpdiActionFormat,
|
||||
lpCallback, pvRef, dwFlags);
|
||||
return 0;
|
||||
}
|
||||
|
@ -492,7 +492,7 @@ static HRESULT WINAPI IDirectInput8WImpl_EnumDevicesBySemantics(
|
|||
{
|
||||
IDirectInputImpl *This = (IDirectInputImpl *)iface;
|
||||
|
||||
FIXME("(this=%p,%s,%p,%p,%p,%04lx): stub\n", This, debugstr_w(ptszUserName), lpdiActionFormat,
|
||||
FIXME("(this=%p,%s,%p,%p,%p,%04x): stub\n", This, debugstr_w(ptszUserName), lpdiActionFormat,
|
||||
lpCallback, pvRef, dwFlags);
|
||||
return 0;
|
||||
}
|
||||
|
@ -504,7 +504,7 @@ static HRESULT WINAPI IDirectInput8AImpl_ConfigureDevices(
|
|||
{
|
||||
IDirectInputImpl *This = (IDirectInputImpl *)iface;
|
||||
|
||||
FIXME("(this=%p,%p,%p,%04lx,%p): stub\n", This, lpdiCallback, lpdiCDParams,
|
||||
FIXME("(this=%p,%p,%p,%04x,%p): stub\n", This, lpdiCallback, lpdiCDParams,
|
||||
dwFlags, pvRefData);
|
||||
return 0;
|
||||
}
|
||||
|
@ -516,7 +516,7 @@ static HRESULT WINAPI IDirectInput8WImpl_ConfigureDevices(
|
|||
{
|
||||
IDirectInputImpl *This = (IDirectInputImpl *)iface;
|
||||
|
||||
FIXME("(this=%p,%p,%p,%04lx,%p): stub\n", This, lpdiCallback, lpdiCDParams,
|
||||
FIXME("(this=%p,%p,%p,%04x,%p): stub\n", This, lpdiCallback, lpdiCDParams,
|
||||
dwFlags, pvRefData);
|
||||
return 0;
|
||||
}
|
||||
|
@ -807,7 +807,7 @@ static BOOL create_hook_thread(void)
|
|||
}
|
||||
|
||||
ref = ++hook_thread_refcount;
|
||||
TRACE("Refcount %ld\n", ref);
|
||||
TRACE("Refcount %d\n", ref);
|
||||
if (ref == 1)
|
||||
{
|
||||
DWORD tid;
|
||||
|
@ -836,7 +836,7 @@ static void release_hook_thread(void)
|
|||
|
||||
EnterCriticalSection(&dinput_hook_crit);
|
||||
ref = --hook_thread_refcount;
|
||||
TRACE("Releasing to %ld\n", ref);
|
||||
TRACE("Releasing to %d\n", ref);
|
||||
if (ref == 0)
|
||||
{
|
||||
HWND hwnd = hook_thread_hwnd;
|
||||
|
|
|
@ -120,33 +120,33 @@ static void _dump_DIEFFECT_flags(DWORD dwFlags)
|
|||
static void _dump_DIENVELOPE(LPDIENVELOPE env)
|
||||
{
|
||||
if (env->dwSize != sizeof(DIENVELOPE)) {
|
||||
WARN("Non-standard DIENVELOPE structure size (%ld instead of %d).\n",
|
||||
WARN("Non-standard DIENVELOPE structure size (%d instead of %d).\n",
|
||||
env->dwSize, sizeof(DIENVELOPE));
|
||||
}
|
||||
TRACE("Envelope has attack (level: %ld time: %ld), fade (level: %ld time: %ld)\n",
|
||||
TRACE("Envelope has attack (level: %d time: %d), fade (level: %d time: %d)\n",
|
||||
env->dwAttackLevel, env->dwAttackTime, env->dwFadeLevel, env->dwFadeTime);
|
||||
}
|
||||
|
||||
static void _dump_DICONSTANTFORCE(LPDICONSTANTFORCE frc)
|
||||
{
|
||||
TRACE("Constant force has magnitude %ld\n", frc->lMagnitude);
|
||||
TRACE("Constant force has magnitude %d\n", frc->lMagnitude);
|
||||
}
|
||||
|
||||
static void _dump_DIPERIODIC(LPDIPERIODIC frc)
|
||||
{
|
||||
TRACE("Periodic force has magnitude %ld, offset %ld, phase %ld, period %ld\n",
|
||||
TRACE("Periodic force has magnitude %d, offset %d, phase %d, period %d\n",
|
||||
frc->dwMagnitude, frc->lOffset, frc->dwPhase, frc->dwPeriod);
|
||||
}
|
||||
|
||||
static void _dump_DIRAMPFORCE(LPDIRAMPFORCE frc)
|
||||
{
|
||||
TRACE("Ramp force has start %ld, end %ld\n",
|
||||
TRACE("Ramp force has start %d, end %d\n",
|
||||
frc->lStart, frc->lEnd);
|
||||
}
|
||||
|
||||
static void _dump_DICONDITION(LPDICONDITION frc)
|
||||
{
|
||||
TRACE("Condition has offset %ld, pos/neg coefficients %ld and %ld, pos/neg saturations %ld and %ld, deadband %ld\n",
|
||||
TRACE("Condition has offset %d, pos/neg coefficients %d and %d, pos/neg saturations %d and %d, deadband %d\n",
|
||||
frc->lOffset, frc->lPositiveCoefficient, frc->lNegativeCoefficient,
|
||||
frc->dwPositiveSaturation, frc->dwNegativeSaturation, frc->lDeadBand);
|
||||
}
|
||||
|
@ -154,14 +154,14 @@ static void _dump_DICONDITION(LPDICONDITION frc)
|
|||
static void _dump_DICUSTOMFORCE(LPDICUSTOMFORCE frc)
|
||||
{
|
||||
unsigned int i;
|
||||
TRACE("Custom force uses %ld channels, sample period %ld. Has %ld samples at %p.\n",
|
||||
TRACE("Custom force uses %d channels, sample period %d. Has %d samples at %p.\n",
|
||||
frc->cChannels, frc->dwSamplePeriod, frc->cSamples, frc->rglForceData);
|
||||
if (frc->cSamples % frc->cChannels != 0)
|
||||
WARN("Custom force has a non-integral samples-per-channel count!\n");
|
||||
if (TRACE_ON(dinput)) {
|
||||
DPRINTF("Custom force data (time aligned, axes in order):\n");
|
||||
for (i = 1; i <= frc->cSamples; ++i) {
|
||||
DPRINTF("%ld ", frc->rglForceData[i]);
|
||||
DPRINTF("%d ", frc->rglForceData[i]);
|
||||
if (i % frc->cChannels == 0)
|
||||
DPRINTF("\n");
|
||||
}
|
||||
|
@ -174,34 +174,34 @@ static void _dump_DIEFFECT(LPCDIEFFECT eff, REFGUID guid)
|
|||
DWORD type = _typeFromGUID(guid);
|
||||
|
||||
TRACE("Dumping DIEFFECT structure:\n");
|
||||
TRACE(" - dwSize: %ld\n", eff->dwSize);
|
||||
TRACE(" - dwSize: %d\n", eff->dwSize);
|
||||
if ((eff->dwSize != sizeof(DIEFFECT)) && (eff->dwSize != sizeof(DIEFFECT_DX5))) {
|
||||
WARN("Non-standard DIEFFECT structure size (%ld instead of %d or %d).\n",
|
||||
WARN("Non-standard DIEFFECT structure size (%d instead of %d or %d).\n",
|
||||
eff->dwSize, sizeof(DIEFFECT), sizeof(DIEFFECT_DX5));
|
||||
}
|
||||
TRACE(" - dwFlags: %ld\n", eff->dwFlags);
|
||||
TRACE(" - dwFlags: %d\n", eff->dwFlags);
|
||||
TRACE(" ");
|
||||
_dump_DIEFFECT_flags(eff->dwFlags);
|
||||
TRACE(" - dwDuration: %ld\n", eff->dwDuration);
|
||||
TRACE(" - dwGain: %ld\n", eff->dwGain);
|
||||
TRACE(" - dwDuration: %d\n", eff->dwDuration);
|
||||
TRACE(" - dwGain: %d\n", eff->dwGain);
|
||||
if ((eff->dwGain > 10000) || (eff->dwGain < 0))
|
||||
WARN("dwGain is out of range (0 - 10,000)\n");
|
||||
TRACE(" - dwTriggerButton: %ld\n", eff->dwTriggerButton);
|
||||
TRACE(" - dwTriggerRepeatInterval: %ld\n", eff->dwTriggerRepeatInterval);
|
||||
TRACE(" - cAxes: %ld\n", eff->cAxes);
|
||||
TRACE(" - dwTriggerButton: %d\n", eff->dwTriggerButton);
|
||||
TRACE(" - dwTriggerRepeatInterval: %d\n", eff->dwTriggerRepeatInterval);
|
||||
TRACE(" - cAxes: %d\n", eff->cAxes);
|
||||
TRACE(" - rgdwAxes: %p\n", eff->rgdwAxes);
|
||||
if (TRACE_ON(dinput)) {
|
||||
TRACE(" ");
|
||||
for (i = 0; i < eff->cAxes; ++i)
|
||||
DPRINTF("%ld ", eff->rgdwAxes[i]);
|
||||
DPRINTF("%d ", eff->rgdwAxes[i]);
|
||||
DPRINTF("\n");
|
||||
}
|
||||
TRACE(" - rglDirection: %p\n", eff->rglDirection);
|
||||
TRACE(" - lpEnvelope: %p\n", eff->lpEnvelope);
|
||||
TRACE(" - cbTypeSpecificParams: %ld\n", eff->cbTypeSpecificParams);
|
||||
TRACE(" - cbTypeSpecificParams: %d\n", eff->cbTypeSpecificParams);
|
||||
TRACE(" - lpvTypeSpecificParams: %p\n", eff->lpvTypeSpecificParams);
|
||||
if (eff->dwSize > sizeof(DIEFFECT_DX5))
|
||||
TRACE(" - dwStartDelay: %ld\n", eff->dwStartDelay);
|
||||
TRACE(" - dwStartDelay: %d\n", eff->dwStartDelay);
|
||||
if (eff->lpEnvelope != NULL)
|
||||
_dump_DIENVELOPE(eff->lpEnvelope);
|
||||
if (type == DIEFT_CONSTANTFORCE) {
|
||||
|
@ -314,7 +314,7 @@ static HRESULT WINAPI LinuxInputEffectImpl_GetParameters(
|
|||
{
|
||||
HRESULT diErr = DI_OK;
|
||||
LinuxInputEffectImpl *This = (LinuxInputEffectImpl *)iface;
|
||||
TRACE("(this=%p,%p,%ld)\n", This, peff, dwFlags);
|
||||
TRACE("(this=%p,%p,%d)\n", This, peff, dwFlags);
|
||||
|
||||
/* Major conversion factors are:
|
||||
* times: millisecond (linux) -> microsecond (windows) (x * 1000)
|
||||
|
@ -466,7 +466,7 @@ static HRESULT WINAPI LinuxInputEffectImpl_Initialize(
|
|||
DWORD dwVersion,
|
||||
REFGUID rguid)
|
||||
{
|
||||
FIXME("(this=%p,%p,%ld,%s): stub!\n",
|
||||
FIXME("(this=%p,%p,%d,%s): stub!\n",
|
||||
iface, hinst, dwVersion, debugstr_guid(rguid));
|
||||
|
||||
return DI_OK;
|
||||
|
@ -500,7 +500,7 @@ static HRESULT WINAPI LinuxInputEffectImpl_Start(
|
|||
struct input_event event;
|
||||
LinuxInputEffectImpl* This = (LinuxInputEffectImpl*)iface;
|
||||
|
||||
TRACE("(this=%p,%ld,%ld)\n", This, dwIterations, dwFlags);
|
||||
TRACE("(this=%p,%d,%d)\n", This, dwIterations, dwFlags);
|
||||
|
||||
if (!(dwFlags & DIES_NODOWNLOAD)) {
|
||||
/* Download the effect if necessary */
|
||||
|
@ -535,7 +535,7 @@ static HRESULT WINAPI LinuxInputEffectImpl_SetParameters(
|
|||
DWORD type = _typeFromGUID(&This->guid);
|
||||
HRESULT retval = DI_OK;
|
||||
|
||||
TRACE("(this=%p,%p,%ld)\n", This, peff, dwFlags);
|
||||
TRACE("(this=%p,%p,%d)\n", This, peff, dwFlags);
|
||||
|
||||
_dump_DIEFFECT(peff, &This->guid);
|
||||
|
||||
|
@ -846,7 +846,7 @@ HRESULT linuxinput_get_info_A(
|
|||
{
|
||||
DWORD type = _typeFromGUID(rguid);
|
||||
|
||||
TRACE("(%d, %s, %p) type=%ld\n", fd, _dump_dinput_GUID(rguid), info, type);
|
||||
TRACE("(%d, %s, %p) type=%d\n", fd, _dump_dinput_GUID(rguid), info, type);
|
||||
|
||||
if (!info) return E_POINTER;
|
||||
|
||||
|
@ -880,7 +880,7 @@ HRESULT linuxinput_get_info_W(
|
|||
{
|
||||
DWORD type = _typeFromGUID(rguid);
|
||||
|
||||
TRACE("(%d, %s, %p) type=%ld\n", fd, _dump_dinput_GUID(rguid), info, type);
|
||||
TRACE("(%d, %s, %p) type=%d\n", fd, _dump_dinput_GUID(rguid), info, type);
|
||||
|
||||
if (!info) return E_POINTER;
|
||||
|
||||
|
|
|
@ -128,24 +128,24 @@ static GUID DInput_Wine_Joystick_GUID = { /* 9e573ed9-7734-11d2-8d4a-23903fb6bdf
|
|||
|
||||
static void _dump_DIDEVCAPS(LPDIDEVCAPS lpDIDevCaps)
|
||||
{
|
||||
TRACE("dwSize: %ld\n", lpDIDevCaps->dwSize);
|
||||
TRACE("dwFlags: %08lx\n",lpDIDevCaps->dwFlags);
|
||||
TRACE("dwDevType: %08lx %s\n", lpDIDevCaps->dwDevType,
|
||||
TRACE("dwSize: %d\n", lpDIDevCaps->dwSize);
|
||||
TRACE("dwFlags: %08x\n", lpDIDevCaps->dwFlags);
|
||||
TRACE("dwDevType: %08x %s\n", lpDIDevCaps->dwDevType,
|
||||
lpDIDevCaps->dwDevType == DIDEVTYPE_DEVICE ? "DIDEVTYPE_DEVICE" :
|
||||
lpDIDevCaps->dwDevType == DIDEVTYPE_DEVICE ? "DIDEVTYPE_DEVICE" :
|
||||
lpDIDevCaps->dwDevType == DIDEVTYPE_MOUSE ? "DIDEVTYPE_MOUSE" :
|
||||
lpDIDevCaps->dwDevType == DIDEVTYPE_KEYBOARD ? "DIDEVTYPE_KEYBOARD" :
|
||||
lpDIDevCaps->dwDevType == DIDEVTYPE_JOYSTICK ? "DIDEVTYPE_JOYSTICK" :
|
||||
lpDIDevCaps->dwDevType == DIDEVTYPE_HID ? "DIDEVTYPE_HID" : "UNKNOWN");
|
||||
TRACE("dwAxes: %ld\n",lpDIDevCaps->dwAxes);
|
||||
TRACE("dwButtons: %ld\n",lpDIDevCaps->dwButtons);
|
||||
TRACE("dwPOVs: %ld\n",lpDIDevCaps->dwPOVs);
|
||||
TRACE("dwAxes: %d\n", lpDIDevCaps->dwAxes);
|
||||
TRACE("dwButtons: %d\n", lpDIDevCaps->dwButtons);
|
||||
TRACE("dwPOVs: %d\n", lpDIDevCaps->dwPOVs);
|
||||
if (lpDIDevCaps->dwSize > sizeof(DIDEVCAPS_DX3)) {
|
||||
TRACE("dwFFSamplePeriod: %ld\n",lpDIDevCaps->dwFFSamplePeriod);
|
||||
TRACE("dwFFMinTimeResolution: %ld\n",lpDIDevCaps->dwFFMinTimeResolution);
|
||||
TRACE("dwFirmwareRevision: %ld\n",lpDIDevCaps->dwFirmwareRevision);
|
||||
TRACE("dwHardwareRevision: %ld\n",lpDIDevCaps->dwHardwareRevision);
|
||||
TRACE("dwFFDriverVersion: %ld\n",lpDIDevCaps->dwFFDriverVersion);
|
||||
TRACE("dwFFSamplePeriod: %d\n", lpDIDevCaps->dwFFSamplePeriod);
|
||||
TRACE("dwFFMinTimeResolution: %d\n", lpDIDevCaps->dwFFMinTimeResolution);
|
||||
TRACE("dwFirmwareRevision: %d\n", lpDIDevCaps->dwFirmwareRevision);
|
||||
TRACE("dwHardwareRevision: %d\n", lpDIDevCaps->dwHardwareRevision);
|
||||
TRACE("dwFFDriverVersion: %d\n", lpDIDevCaps->dwFFDriverVersion);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -309,7 +309,7 @@ static HRESULT setup_dinput_options(JoystickImpl * device)
|
|||
|
||||
if (!get_config_key( hkey, appkey, "DefaultDeadZone", buffer, MAX_PATH )) {
|
||||
device->deadzone = atoi(buffer);
|
||||
TRACE("setting default deadzone to: \"%s\" %ld\n", buffer, device->deadzone);
|
||||
TRACE("setting default deadzone to: \"%s\" %d\n", buffer, device->deadzone);
|
||||
}
|
||||
|
||||
if (!get_config_key( hkey, appkey, device->name, buffer, MAX_PATH )) {
|
||||
|
@ -432,17 +432,17 @@ static void calculate_ids(JoystickImpl* device)
|
|||
axis++;
|
||||
type = DIDFT_GETTYPE(device->user_df->rgodf[i].dwType) |
|
||||
DIDFT_MAKEINSTANCE(axis + axis_base);
|
||||
TRACE("axis type = 0x%08lx\n", type);
|
||||
TRACE("axis type = 0x%08x\n", type);
|
||||
} else if (DIDFT_GETTYPE(device->user_df->rgodf[i].dwType) & DIDFT_POV) {
|
||||
pov++;
|
||||
type = DIDFT_GETTYPE(device->user_df->rgodf[i].dwType) |
|
||||
DIDFT_MAKEINSTANCE(pov + pov_base);
|
||||
TRACE("POV type = 0x%08lx\n", type);
|
||||
TRACE("POV type = 0x%08x\n", type);
|
||||
} else if (DIDFT_GETTYPE(device->user_df->rgodf[i].dwType) & DIDFT_BUTTON) {
|
||||
button++;
|
||||
type = DIDFT_GETTYPE(device->user_df->rgodf[i].dwType) |
|
||||
DIDFT_MAKEINSTANCE(button + button_base);
|
||||
TRACE("button type = 0x%08lx\n", type);
|
||||
TRACE("button type = 0x%08x\n", type);
|
||||
}
|
||||
device->user_df->rgodf[i].dwType = type;
|
||||
}
|
||||
|
@ -579,7 +579,7 @@ static HRESULT alloc_device(REFGUID rguid, const void *jvt, IDirectInputImpl *di
|
|||
if (TRACE_ON(dinput)) {
|
||||
_dump_DIDATAFORMAT(newDevice->user_df);
|
||||
for (i = 0; i < (newDevice->axes); i++)
|
||||
TRACE("axis_map[%ld] = %d\n", i, newDevice->axis_map[i]);
|
||||
TRACE("axis_map[%d] = %d\n", i, newDevice->axis_map[i]);
|
||||
_dump_DIDEVCAPS(&newDevice->devcaps);
|
||||
}
|
||||
|
||||
|
@ -1009,7 +1009,7 @@ static HRESULT WINAPI JoystickAImpl_GetDeviceState(
|
|||
{
|
||||
JoystickImpl *This = (JoystickImpl *)iface;
|
||||
|
||||
TRACE("(%p,0x%08lx,%p)\n",This,len,ptr);
|
||||
TRACE("(%p,0x%08x,%p)\n", This, len, ptr);
|
||||
|
||||
if (!This->acquired) {
|
||||
WARN("not acquired\n");
|
||||
|
@ -1040,7 +1040,7 @@ static HRESULT WINAPI JoystickAImpl_GetDeviceData(
|
|||
int nqtail;
|
||||
HRESULT hr = DI_OK;
|
||||
|
||||
TRACE("(%p)->(dods=%ld,entries=%ld,fl=0x%08lx)\n",This,dodsize,*entries,flags);
|
||||
TRACE("(%p)->(dods=%d,entries=%d,fl=0x%08x)\n", This, dodsize, *entries, flags);
|
||||
|
||||
if (!This->acquired) {
|
||||
WARN("not acquired\n");
|
||||
|
@ -1058,7 +1058,7 @@ static HRESULT WINAPI JoystickAImpl_GetDeviceData(
|
|||
|
||||
if (dod == NULL) {
|
||||
if (len)
|
||||
TRACE("Application discarding %ld event(s).\n", len);
|
||||
TRACE("Application discarding %d event(s).\n", len);
|
||||
|
||||
*entries = len;
|
||||
nqtail = This->queue_tail + len;
|
||||
|
@ -1072,7 +1072,7 @@ static HRESULT WINAPI JoystickAImpl_GetDeviceData(
|
|||
}
|
||||
|
||||
if (len)
|
||||
TRACE("Application retrieving %ld event(s).\n", len);
|
||||
TRACE("Application retrieving %d event(s).\n", len);
|
||||
|
||||
*entries = 0;
|
||||
nqtail = This->queue_tail;
|
||||
|
@ -1144,7 +1144,7 @@ static HRESULT WINAPI JoystickAImpl_SetProperty(
|
|||
switch (LOWORD(rguid)) {
|
||||
case (DWORD) DIPROP_BUFFERSIZE: {
|
||||
LPCDIPROPDWORD pd = (LPCDIPROPDWORD)ph;
|
||||
TRACE("buffersize = %ld\n",pd->dwData);
|
||||
TRACE("buffersize = %d\n", pd->dwData);
|
||||
if (This->data_queue)
|
||||
This->data_queue = HeapReAlloc(GetProcessHeap(),0, This->data_queue, pd->dwData * sizeof(DIDEVICEOBJECTDATA));
|
||||
else
|
||||
|
@ -1157,14 +1157,14 @@ static HRESULT WINAPI JoystickAImpl_SetProperty(
|
|||
case (DWORD)DIPROP_RANGE: {
|
||||
LPCDIPROPRANGE pr = (LPCDIPROPRANGE)ph;
|
||||
if (ph->dwHow == DIPH_DEVICE) {
|
||||
TRACE("proprange(%ld,%ld) all\n",pr->lMin,pr->lMax);
|
||||
TRACE("proprange(%d,%d) all\n", pr->lMin, pr->lMax);
|
||||
for (i = 0; i < This->user_df->dwNumObjs; i++) {
|
||||
This->props[i].lMin = pr->lMin;
|
||||
This->props[i].lMax = pr->lMax;
|
||||
}
|
||||
} else {
|
||||
int obj = find_property(This, ph);
|
||||
TRACE("proprange(%ld,%ld) obj=%d\n",pr->lMin,pr->lMax,obj);
|
||||
TRACE("proprange(%d,%d) obj=%d\n", pr->lMin, pr->lMax, obj);
|
||||
if (obj >= 0) {
|
||||
This->props[obj].lMin = pr->lMin;
|
||||
This->props[obj].lMax = pr->lMax;
|
||||
|
@ -1176,12 +1176,12 @@ static HRESULT WINAPI JoystickAImpl_SetProperty(
|
|||
case (DWORD)DIPROP_DEADZONE: {
|
||||
LPCDIPROPDWORD pd = (LPCDIPROPDWORD)ph;
|
||||
if (ph->dwHow == DIPH_DEVICE) {
|
||||
TRACE("deadzone(%ld) all\n",pd->dwData);
|
||||
TRACE("deadzone(%d) all\n", pd->dwData);
|
||||
for (i = 0; i < This->user_df->dwNumObjs; i++)
|
||||
This->props[i].lDeadZone = pd->dwData;
|
||||
} else {
|
||||
int obj = find_property(This, ph);
|
||||
TRACE("deadzone(%ld) obj=%d\n",pd->dwData,obj);
|
||||
TRACE("deadzone(%d) obj=%d\n", pd->dwData, obj);
|
||||
if (obj >= 0) {
|
||||
This->props[obj].lDeadZone = pd->dwData;
|
||||
return DI_OK;
|
||||
|
@ -1192,12 +1192,12 @@ static HRESULT WINAPI JoystickAImpl_SetProperty(
|
|||
case (DWORD)DIPROP_SATURATION: {
|
||||
LPCDIPROPDWORD pd = (LPCDIPROPDWORD)ph;
|
||||
if (ph->dwHow == DIPH_DEVICE) {
|
||||
TRACE("saturation(%ld) all\n",pd->dwData);
|
||||
TRACE("saturation(%d) all\n", pd->dwData);
|
||||
for (i = 0; i < This->user_df->dwNumObjs; i++)
|
||||
This->props[i].lSaturation = pd->dwData;
|
||||
} else {
|
||||
int obj = find_property(This, ph);
|
||||
TRACE("saturation(%ld) obj=%d\n",pd->dwData,obj);
|
||||
TRACE("saturation(%d) obj=%d\n", pd->dwData, obj);
|
||||
if (obj >= 0) {
|
||||
This->props[obj].lSaturation = pd->dwData;
|
||||
return DI_OK;
|
||||
|
@ -1287,7 +1287,7 @@ static HRESULT WINAPI JoystickAImpl_EnumObjects(
|
|||
int user_offset;
|
||||
int user_object;
|
||||
|
||||
TRACE("(this=%p,%p,%p,%08lx)\n", This, lpCallback, lpvRef, dwFlags);
|
||||
TRACE("(this=%p,%p,%p,%08x)\n", This, lpCallback, lpvRef, dwFlags);
|
||||
if (TRACE_ON(dinput)) {
|
||||
TRACE(" - flags = ");
|
||||
_dump_EnumObjects_flags(dwFlags);
|
||||
|
@ -1452,7 +1452,7 @@ static HRESULT WINAPI JoystickAImpl_GetProperty(
|
|||
if (obj >= 0) {
|
||||
pr->lMin = This->props[obj].lMin;
|
||||
pr->lMax = This->props[obj].lMax;
|
||||
TRACE("range(%ld, %ld) obj=%d\n", pr->lMin, pr->lMax, obj);
|
||||
TRACE("range(%d, %d) obj=%d\n", pr->lMin, pr->lMax, obj);
|
||||
return DI_OK;
|
||||
}
|
||||
break;
|
||||
|
@ -1462,7 +1462,7 @@ static HRESULT WINAPI JoystickAImpl_GetProperty(
|
|||
int obj = find_property(This, pdiph);
|
||||
if (obj >= 0) {
|
||||
pd->dwData = This->props[obj].lDeadZone;
|
||||
TRACE("deadzone(%ld) obj=%d\n", pd->dwData, obj);
|
||||
TRACE("deadzone(%d) obj=%d\n", pd->dwData, obj);
|
||||
return DI_OK;
|
||||
}
|
||||
break;
|
||||
|
@ -1472,7 +1472,7 @@ static HRESULT WINAPI JoystickAImpl_GetProperty(
|
|||
int obj = find_property(This, pdiph);
|
||||
if (obj >= 0) {
|
||||
pd->dwData = This->props[obj].lSaturation;
|
||||
TRACE("saturation(%ld) obj=%d\n", pd->dwData, obj);
|
||||
TRACE("saturation(%d) obj=%d\n", pd->dwData, obj);
|
||||
return DI_OK;
|
||||
}
|
||||
break;
|
||||
|
@ -1499,7 +1499,7 @@ HRESULT WINAPI JoystickAImpl_GetObjectInfo(
|
|||
DIDEVICEOBJECTINSTANCEA didoiA;
|
||||
unsigned int i;
|
||||
|
||||
TRACE("(%p,%p,%ld,0x%08lx(%s))\n",
|
||||
TRACE("(%p,%p,%d,0x%08x(%s))\n",
|
||||
iface, pdidoi, dwObj, dwHow,
|
||||
dwHow == DIPH_BYOFFSET ? "DIPH_BYOFFSET" :
|
||||
dwHow == DIPH_BYID ? "DIPH_BYID" :
|
||||
|
@ -1513,7 +1513,7 @@ HRESULT WINAPI JoystickAImpl_GetObjectInfo(
|
|||
|
||||
if ((pdidoi->dwSize != sizeof(DIDEVICEOBJECTINSTANCEA)) &&
|
||||
(pdidoi->dwSize != sizeof(DIDEVICEOBJECTINSTANCE_DX3A))) {
|
||||
WARN("invalid parameter: pdidoi->dwSize = %ld != %d or %d\n",
|
||||
WARN("invalid parameter: pdidoi->dwSize = %d != %d or %d\n",
|
||||
pdidoi->dwSize, sizeof(DIDEVICEOBJECTINSTANCEA),
|
||||
sizeof(DIDEVICEOBJECTINSTANCE_DX3A));
|
||||
return DIERR_INVALIDPARAM;
|
||||
|
@ -1565,7 +1565,7 @@ HRESULT WINAPI JoystickAImpl_GetObjectInfo(
|
|||
FIXME("dwHow = DIPH_BYUSAGE not implemented\n");
|
||||
break;
|
||||
default:
|
||||
WARN("invalid parameter: dwHow = %08lx\n", dwHow);
|
||||
WARN("invalid parameter: dwHow = %08x\n", dwHow);
|
||||
return DIERR_INVALIDPARAM;
|
||||
}
|
||||
|
||||
|
@ -1592,7 +1592,7 @@ HRESULT WINAPI JoystickAImpl_GetDeviceInfo(
|
|||
|
||||
if ((pdidi->dwSize != sizeof(DIDEVICEINSTANCE_DX3A)) &&
|
||||
(pdidi->dwSize != sizeof(DIDEVICEINSTANCEA))) {
|
||||
WARN("invalid parameter: pdidi->dwSize = %ld != %d or %d\n",
|
||||
WARN("invalid parameter: pdidi->dwSize = %d != %d or %d\n",
|
||||
pdidi->dwSize, sizeof(DIDEVICEINSTANCE_DX3A),
|
||||
sizeof(DIDEVICEINSTANCEA));
|
||||
return DIERR_INVALIDPARAM;
|
||||
|
@ -1627,7 +1627,7 @@ HRESULT WINAPI JoystickWImpl_GetDeviceInfo(
|
|||
|
||||
if ((pdidi->dwSize != sizeof(DIDEVICEINSTANCE_DX3W)) &&
|
||||
(pdidi->dwSize != sizeof(DIDEVICEINSTANCEW))) {
|
||||
WARN("invalid parameter: pdidi->dwSize = %ld != %d or %d\n",
|
||||
WARN("invalid parameter: pdidi->dwSize = %d != %d or %d\n",
|
||||
pdidi->dwSize, sizeof(DIDEVICEINSTANCE_DX3W),
|
||||
sizeof(DIDEVICEINSTANCEW));
|
||||
return DIERR_INVALIDPARAM;
|
||||
|
|
|
@ -845,17 +845,17 @@ static void calculate_ids(LPDIDATAFORMAT df)
|
|||
axis++;
|
||||
type = DIDFT_GETTYPE(df->rgodf[i].dwType) |
|
||||
DIDFT_MAKEINSTANCE(axis + axis_base);
|
||||
TRACE("axis type = 0x%08lx\n", type);
|
||||
TRACE("axis type = 0x%08x\n", type);
|
||||
} else if (DIDFT_GETTYPE(df->rgodf[i].dwType) & DIDFT_POV) {
|
||||
pov++;
|
||||
type = DIDFT_GETTYPE(df->rgodf[i].dwType) |
|
||||
DIDFT_MAKEINSTANCE(pov + pov_base);
|
||||
TRACE("POV type = 0x%08lx\n", type);
|
||||
TRACE("POV type = 0x%08x\n", type);
|
||||
} else if (DIDFT_GETTYPE(df->rgodf[i].dwType) & DIDFT_BUTTON) {
|
||||
button++;
|
||||
type = DIDFT_GETTYPE(df->rgodf[i].dwType) |
|
||||
DIDFT_MAKEINSTANCE(button + button_base);
|
||||
TRACE("button type = 0x%08lx\n", type);
|
||||
TRACE("button type = 0x%08x\n", type);
|
||||
}
|
||||
df->rgodf[i].dwType = type;
|
||||
}
|
||||
|
@ -998,7 +998,7 @@ static HRESULT WINAPI JoystickAImpl_GetDeviceState(
|
|||
) {
|
||||
JoystickImpl *This = (JoystickImpl *)iface;
|
||||
|
||||
TRACE("(this=%p,0x%08lx,%p)\n",This,len,ptr);
|
||||
TRACE("(this=%p,0x%08x,%p)\n", This, len, ptr);
|
||||
|
||||
if (This->joyfd==-1) {
|
||||
WARN("not acquired\n");
|
||||
|
@ -1027,7 +1027,7 @@ static HRESULT WINAPI JoystickAImpl_GetDeviceData(LPDIRECTINPUTDEVICE8A iface,
|
|||
int nqtail;
|
||||
HRESULT hr = DI_OK;
|
||||
|
||||
TRACE("(%p)->(dods=%ld,entries=%ld,fl=0x%08lx)\n",This,dodsize,*entries,flags);
|
||||
TRACE("(%p)->(dods=%d,entries=%d,fl=0x%08x)\n", This, dodsize, *entries, flags);
|
||||
|
||||
if (This->joyfd==-!1) {
|
||||
WARN("not acquired\n");
|
||||
|
@ -1045,7 +1045,7 @@ static HRESULT WINAPI JoystickAImpl_GetDeviceData(LPDIRECTINPUTDEVICE8A iface,
|
|||
|
||||
if (dod == NULL) {
|
||||
if (len)
|
||||
TRACE("Application discarding %ld event(s).\n", len);
|
||||
TRACE("Application discarding %d event(s).\n", len);
|
||||
|
||||
*entries = len;
|
||||
nqtail = This->queue_tail + len;
|
||||
|
@ -1058,7 +1058,7 @@ static HRESULT WINAPI JoystickAImpl_GetDeviceData(LPDIRECTINPUTDEVICE8A iface,
|
|||
}
|
||||
|
||||
if (len)
|
||||
TRACE("Application retrieving %ld event(s).\n", len);
|
||||
TRACE("Application retrieving %d event(s).\n", len);
|
||||
|
||||
*entries = 0;
|
||||
nqtail = This->queue_tail;
|
||||
|
@ -1102,14 +1102,15 @@ static HRESULT WINAPI JoystickAImpl_SetProperty(LPDIRECTINPUTDEVICE8A iface,
|
|||
}
|
||||
|
||||
TRACE("(this=%p,%s,%p)\n",This,debugstr_guid(rguid),ph);
|
||||
TRACE("ph.dwSize = %ld, ph.dwHeaderSize =%ld, ph.dwObj = %ld, ph.dwHow= %ld\n",ph->dwSize, ph->dwHeaderSize,ph->dwObj,ph->dwHow);
|
||||
TRACE("ph.dwSize = %d, ph.dwHeaderSize =%d, ph.dwObj = %d, ph.dwHow= %d\n",
|
||||
ph->dwSize, ph->dwHeaderSize, ph->dwObj, ph->dwHow);
|
||||
|
||||
if (!HIWORD(rguid)) {
|
||||
switch (LOWORD(rguid)) {
|
||||
case (DWORD) DIPROP_BUFFERSIZE: {
|
||||
LPCDIPROPDWORD pd = (LPCDIPROPDWORD)ph;
|
||||
|
||||
TRACE("buffersize = %ld\n",pd->dwData);
|
||||
TRACE("buffersize = %d\n", pd->dwData);
|
||||
if (This->data_queue) {
|
||||
This->data_queue = HeapReAlloc(GetProcessHeap(),0, This->data_queue, pd->dwData * sizeof(DIDEVICEOBJECTDATA));
|
||||
} else {
|
||||
|
@ -1125,14 +1126,14 @@ static HRESULT WINAPI JoystickAImpl_SetProperty(LPDIRECTINPUTDEVICE8A iface,
|
|||
|
||||
if (ph->dwHow == DIPH_DEVICE) {
|
||||
int i;
|
||||
TRACE("proprange(%ld,%ld) all\n",pr->lMin,pr->lMax);
|
||||
TRACE("proprange(%d,%d) all\n", pr->lMin, pr->lMax);
|
||||
for (i = 0; i < This->df->dwNumObjs; i++) {
|
||||
This->wantmin[i] = pr->lMin;
|
||||
This->wantmax[i] = pr->lMax;
|
||||
}
|
||||
} else {
|
||||
int obj = find_property_offset(This, ph);
|
||||
TRACE("proprange(%ld,%ld) obj=%d\n",pr->lMin,pr->lMax,obj);
|
||||
TRACE("proprange(%d,%d) obj=%d\n", pr->lMin, pr->lMax, obj);
|
||||
if (obj >= 0) {
|
||||
This->wantmin[obj] = pr->lMin;
|
||||
This->wantmax[obj] = pr->lMax;
|
||||
|
@ -1145,13 +1146,13 @@ static HRESULT WINAPI JoystickAImpl_SetProperty(LPDIRECTINPUTDEVICE8A iface,
|
|||
LPCDIPROPDWORD pd = (LPCDIPROPDWORD)ph;
|
||||
if (ph->dwHow == DIPH_DEVICE) {
|
||||
int i;
|
||||
TRACE("deadzone(%ld) all\n",pd->dwData);
|
||||
TRACE("deadzone(%d) all\n", pd->dwData);
|
||||
for (i = 0; i < This->df->dwNumObjs; i++) {
|
||||
This->deadz[i] = pd->dwData;
|
||||
}
|
||||
} else {
|
||||
int obj = find_property_offset(This, ph);
|
||||
TRACE("deadzone(%ld) obj=%d\n",pd->dwData,obj);
|
||||
TRACE("deadzone(%d) obj=%d\n", pd->dwData, obj);
|
||||
if (obj >= 0) {
|
||||
This->deadz[obj] = pd->dwData;
|
||||
}
|
||||
|
@ -1263,7 +1264,7 @@ static HRESULT WINAPI JoystickAImpl_EnumObjects(
|
|||
DIDEVICEOBJECTINSTANCEA ddoi;
|
||||
int user_offset, user_object;
|
||||
|
||||
TRACE("(this=%p,%p,%p,%08lx)\n", This, lpCallback, lpvRef, dwFlags);
|
||||
TRACE("(this=%p,%p,%p,%08x)\n", This, lpCallback, lpvRef, dwFlags);
|
||||
if (TRACE_ON(dinput)) {
|
||||
TRACE(" - flags = ");
|
||||
_dump_EnumObjects_flags(dwFlags);
|
||||
|
@ -1446,7 +1447,7 @@ static HRESULT WINAPI JoystickAImpl_GetProperty(LPDIRECTINPUTDEVICE8A iface,
|
|||
if (obj >= 0) {
|
||||
pr->lMin = This->joydev->havemin[obj];
|
||||
pr->lMax = This->joydev->havemax[obj];
|
||||
TRACE("range(%ld, %ld) obj=%d\n", pr->lMin, pr->lMax, obj);
|
||||
TRACE("range(%d, %d) obj=%d\n", pr->lMin, pr->lMax, obj);
|
||||
return DI_OK;
|
||||
}
|
||||
break;
|
||||
|
@ -1521,7 +1522,7 @@ static HRESULT WINAPI JoystickAImpl_EnumEffects(LPDIRECTINPUTDEVICE8A iface,
|
|||
DWORD type = DIEFT_GETTYPE(dwEffType);
|
||||
JoystickImpl* This = (JoystickImpl*)iface;
|
||||
|
||||
TRACE("(this=%p,%p,%ld) type=%ld\n", This, pvRef, dwEffType, type);
|
||||
TRACE("(this=%p,%p,%d) type=%d\n", This, pvRef, dwEffType, type);
|
||||
|
||||
dei.dwSize = sizeof(DIEFFECTINFOA);
|
||||
|
||||
|
@ -1598,7 +1599,7 @@ static HRESULT WINAPI JoystickWImpl_EnumEffects(LPDIRECTINPUTDEVICE8W iface,
|
|||
JoystickImpl* This = (JoystickImpl*)iface;
|
||||
int xfd = This->joyfd;
|
||||
|
||||
TRACE("(this=%p,%p,%ld) type=%ld fd=%d\n", This, pvRef, dwEffType, type, xfd);
|
||||
TRACE("(this=%p,%p,%d) type=%d fd=%d\n", This, pvRef, dwEffType, type, xfd);
|
||||
|
||||
dei.dwSize = sizeof(DIEFFECTINFOW);
|
||||
|
||||
|
@ -1728,7 +1729,7 @@ static HRESULT WINAPI JoystickAImpl_SendForceFeedbackCommand(
|
|||
DWORD dwFlags)
|
||||
{
|
||||
JoystickImpl* This = (JoystickImpl*)iface;
|
||||
TRACE("(this=%p,%ld)\n", This, dwFlags);
|
||||
TRACE("(this=%p,%d)\n", This, dwFlags);
|
||||
|
||||
#ifdef HAVE_STRUCT_FF_EFFECT_DIRECTION
|
||||
if (dwFlags == DISFFC_STOPALL) {
|
||||
|
@ -1778,7 +1779,7 @@ static HRESULT WINAPI JoystickAImpl_EnumCreatedEffectObjects(
|
|||
|
||||
JoystickImpl* This = (JoystickImpl*)iface;
|
||||
EffectListItem* itr = This->top_effect;
|
||||
TRACE("(this=%p,%p,%p,%ld)\n", This, lpCallback, pvRef, dwFlags);
|
||||
TRACE("(this=%p,%p,%p,%d)\n", This, lpCallback, pvRef, dwFlags);
|
||||
|
||||
if (!lpCallback)
|
||||
return DIERR_INVALIDPARAM;
|
||||
|
|
|
@ -121,7 +121,7 @@ static void fill_keyboard_dideviceinstanceA(LPDIDEVICEINSTANCEA lpddi, DWORD ver
|
|||
|
||||
dwSize = lpddi->dwSize;
|
||||
|
||||
TRACE("%ld %p\n", dwSize, lpddi);
|
||||
TRACE("%d %p\n", dwSize, lpddi);
|
||||
|
||||
memset(lpddi, 0, dwSize);
|
||||
memset(&ddi, 0, sizeof(ddi));
|
||||
|
@ -145,7 +145,7 @@ static void fill_keyboard_dideviceinstanceW(LPDIDEVICEINSTANCEW lpddi, DWORD ver
|
|||
|
||||
dwSize = lpddi->dwSize;
|
||||
|
||||
TRACE("%ld %p\n", dwSize, lpddi);
|
||||
TRACE("%d %p\n", dwSize, lpddi);
|
||||
|
||||
memset(lpddi, 0, dwSize);
|
||||
memset(&ddi, 0, sizeof(ddi));
|
||||
|
@ -284,14 +284,14 @@ static HRESULT WINAPI SysKeyboardAImpl_SetProperty(
|
|||
SysKeyboardImpl *This = (SysKeyboardImpl *)iface;
|
||||
|
||||
TRACE("(this=%p,%s,%p)\n",This,debugstr_guid(rguid),ph);
|
||||
TRACE("(size=%ld,headersize=%ld,obj=%ld,how=%ld\n",
|
||||
ph->dwSize,ph->dwHeaderSize,ph->dwObj,ph->dwHow);
|
||||
TRACE("(size=%d,headersize=%d,obj=%d,how=%d\n",
|
||||
ph->dwSize, ph->dwHeaderSize, ph->dwObj, ph->dwHow);
|
||||
if (!HIWORD(rguid)) {
|
||||
switch (LOWORD(rguid)) {
|
||||
case (DWORD) DIPROP_BUFFERSIZE: {
|
||||
LPCDIPROPDWORD pd = (LPCDIPROPDWORD)ph;
|
||||
|
||||
TRACE("(buffersize=%ld)\n",pd->dwData);
|
||||
TRACE("(buffersize=%d)\n", pd->dwData);
|
||||
|
||||
if (This->acquired)
|
||||
return DIERR_INVALIDPARAM;
|
||||
|
@ -315,14 +315,14 @@ static HRESULT WINAPI SysKeyboardAImpl_GetProperty(
|
|||
SysKeyboardImpl *This = (SysKeyboardImpl *)iface;
|
||||
|
||||
TRACE("(this=%p,%s,%p)\n",This,debugstr_guid(rguid),ph);
|
||||
TRACE("(size=%ld,headersize=%ld,obj=%ld,how=%ld\n",
|
||||
ph->dwSize,ph->dwHeaderSize,ph->dwObj,ph->dwHow);
|
||||
TRACE("(size=%d,headersize=%d,obj=%d,how=%d\n",
|
||||
ph->dwSize, ph->dwHeaderSize, ph->dwObj, ph->dwHow);
|
||||
if (!HIWORD(rguid)) {
|
||||
switch (LOWORD(rguid)) {
|
||||
case (DWORD) DIPROP_BUFFERSIZE: {
|
||||
LPDIPROPDWORD pd = (LPDIPROPDWORD)ph;
|
||||
|
||||
TRACE("(buffersize=%ld)\n",pd->dwData);
|
||||
TRACE("(buffersize=%d)\n", pd->dwData);
|
||||
|
||||
if (This->acquired)
|
||||
return DIERR_INVALIDPARAM;
|
||||
|
@ -344,7 +344,7 @@ static HRESULT WINAPI SysKeyboardAImpl_GetDeviceState(
|
|||
)
|
||||
{
|
||||
SysKeyboardImpl *This = (SysKeyboardImpl *)iface;
|
||||
TRACE("(%p)->(%ld,%p)\n", This, len, ptr);
|
||||
TRACE("(%p)->(%d,%p)\n", This, len, ptr);
|
||||
|
||||
if (This->acquired == 0) return DIERR_NOTACQUIRED;
|
||||
|
||||
|
@ -379,7 +379,7 @@ static HRESULT WINAPI SysKeyboardAImpl_GetDeviceData(
|
|||
HRESULT ret = DI_OK;
|
||||
int len;
|
||||
|
||||
TRACE("(%p) %p -> %p(%ld) x%ld, 0x%08lx\n",
|
||||
TRACE("(%p) %p -> %p(%d) x%d, 0x%08x\n",
|
||||
This, dod, entries, entries ? *entries : 0, dodsize, flags);
|
||||
|
||||
if (!This->acquired)
|
||||
|
@ -421,7 +421,7 @@ static HRESULT WINAPI SysKeyboardAImpl_GetDeviceData(
|
|||
|
||||
LeaveCriticalSection(&This->crit);
|
||||
|
||||
TRACE("Returning %ld events queued\n", *entries);
|
||||
TRACE("Returning %d events queued\n", *entries);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -435,7 +435,7 @@ static HRESULT WINAPI SysKeyboardAImpl_EnumObjects(
|
|||
DIDEVICEOBJECTINSTANCEA ddoi;
|
||||
int i;
|
||||
|
||||
TRACE("(this=%p,%p,%p,%08lx)\n", This, lpCallback, lpvRef, dwFlags);
|
||||
TRACE("(this=%p,%p,%p,%08x)\n", This, lpCallback, lpvRef, dwFlags);
|
||||
if (TRACE_ON(dinput)) {
|
||||
TRACE(" - flags = ");
|
||||
_dump_EnumObjects_flags(dwFlags);
|
||||
|
@ -595,7 +595,7 @@ SysKeyboardAImpl_GetObjectInfo(
|
|||
DIDEVICEOBJECTINSTANCEA ddoi;
|
||||
DWORD dwSize = pdidoi->dwSize;
|
||||
|
||||
TRACE("(this=%p,%p,%ld,0x%08lx)\n", This, pdidoi, dwObj, dwHow);
|
||||
TRACE("(this=%p,%p,%d,0x%08x)\n", This, pdidoi, dwObj, dwHow);
|
||||
|
||||
if (dwHow == DIPH_BYID) {
|
||||
WARN(" querying by id not supported yet...\n");
|
||||
|
@ -628,7 +628,7 @@ static HRESULT WINAPI SysKeyboardWImpl_GetObjectInfo(LPDIRECTINPUTDEVICE8W iface
|
|||
DIDEVICEOBJECTINSTANCEW ddoi;
|
||||
DWORD dwSize = pdidoi->dwSize;
|
||||
|
||||
TRACE("(this=%p,%p,%ld,0x%08lx)\n", This, pdidoi, dwObj, dwHow);
|
||||
TRACE("(this=%p,%p,%d,0x%08x)\n", This, pdidoi, dwObj, dwHow);
|
||||
|
||||
if (dwHow == DIPH_BYID) {
|
||||
WARN(" querying by id not supported yet...\n");
|
||||
|
|
|
@ -161,7 +161,7 @@ static void fill_mouse_dideviceinstanceA(LPDIDEVICEINSTANCEA lpddi, DWORD versio
|
|||
|
||||
dwSize = lpddi->dwSize;
|
||||
|
||||
TRACE("%ld %p\n", dwSize, lpddi);
|
||||
TRACE("%d %p\n", dwSize, lpddi);
|
||||
|
||||
memset(lpddi, 0, dwSize);
|
||||
memset(&ddi, 0, sizeof(ddi));
|
||||
|
@ -185,7 +185,7 @@ static void fill_mouse_dideviceinstanceW(LPDIDEVICEINSTANCEW lpddi, DWORD versio
|
|||
|
||||
dwSize = lpddi->dwSize;
|
||||
|
||||
TRACE("%ld %p\n", dwSize, lpddi);
|
||||
TRACE("%d %p\n", dwSize, lpddi);
|
||||
|
||||
memset(lpddi, 0, dwSize);
|
||||
memset(&ddi, 0, sizeof(ddi));
|
||||
|
@ -358,7 +358,7 @@ static HRESULT WINAPI SysMouseAImpl_SetCooperativeLevel(
|
|||
{
|
||||
SysMouseImpl *This = (SysMouseImpl *)iface;
|
||||
|
||||
TRACE("(this=%p,%p,0x%08lx)\n",This,hwnd,dwflags);
|
||||
TRACE("(this=%p,%p,0x%08x)\n", This, hwnd, dwflags);
|
||||
|
||||
if (TRACE_ON(dinput)) {
|
||||
TRACE(" cooperative level : ");
|
||||
|
@ -490,7 +490,7 @@ static LRESULT CALLBACK dinput_mouse_hook( int code, WPARAM wparam, LPARAM lpara
|
|||
}
|
||||
}
|
||||
|
||||
TRACE(" msg %x pt %ld %ld (W=%d)\n",
|
||||
TRACE(" msg %x pt %d %d (W=%d)\n",
|
||||
wparam, hook->pt.x, hook->pt.y, (!This->absolute) && This->need_warp );
|
||||
|
||||
switch(wparam) {
|
||||
|
@ -532,7 +532,7 @@ static LRESULT CALLBACK dinput_mouse_hook( int code, WPARAM wparam, LPARAM lpara
|
|||
break;
|
||||
}
|
||||
|
||||
TRACE("(X: %ld - Y: %ld L: %02x M: %02x R: %02x)\n",
|
||||
TRACE("(X: %d - Y: %d L: %02x M: %02x R: %02x)\n",
|
||||
This->m_state.lX, This->m_state.lY,
|
||||
This->m_state.rgbButtons[0], This->m_state.rgbButtons[2], This->m_state.rgbButtons[1]);
|
||||
|
||||
|
@ -622,7 +622,7 @@ static HRESULT WINAPI SysMouseAImpl_Acquire(LPDIRECTINPUTDEVICE8A iface)
|
|||
This->mapped_center.x = This->win_centerX;
|
||||
This->mapped_center.y = This->win_centerY;
|
||||
MapWindowPoints(This->win, HWND_DESKTOP, &This->mapped_center, 1);
|
||||
TRACE("Warping mouse to %ld - %ld\n", This->mapped_center.x, This->mapped_center.y);
|
||||
TRACE("Warping mouse to %d - %d\n", This->mapped_center.x, This->mapped_center.y);
|
||||
SetCursorPos( This->mapped_center.x, This->mapped_center.y );
|
||||
This->last_warped = GetCurrentTime();
|
||||
|
||||
|
@ -664,7 +664,7 @@ static HRESULT WINAPI SysMouseAImpl_Unacquire(LPDIRECTINPUTDEVICE8A iface)
|
|||
|
||||
/* And put the mouse cursor back where it was at acquire time */
|
||||
if (This->absolute == 0) {
|
||||
TRACE(" warping mouse back to (%ld , %ld)\n", This->org_coords.x, This->org_coords.y);
|
||||
TRACE(" warping mouse back to (%d , %d)\n", This->org_coords.x, This->org_coords.y);
|
||||
SetCursorPos(This->org_coords.x, This->org_coords.y);
|
||||
}
|
||||
|
||||
|
@ -685,8 +685,8 @@ static HRESULT WINAPI SysMouseAImpl_GetDeviceState(
|
|||
if(This->acquired == 0) return DIERR_NOTACQUIRED;
|
||||
|
||||
EnterCriticalSection(&(This->crit));
|
||||
TRACE("(this=%p,0x%08lx,%p):\n", This, len, ptr);
|
||||
TRACE("(X: %ld - Y: %ld - Z: %ld L: %02x M: %02x R: %02x)\n",
|
||||
TRACE("(this=%p,0x%08x,%p):\n", This, len, ptr);
|
||||
TRACE("(X: %d - Y: %d - Z: %d L: %02x M: %02x R: %02x)\n",
|
||||
This->m_state.lX, This->m_state.lY, This->m_state.lZ,
|
||||
This->m_state.rgbButtons[0], This->m_state.rgbButtons[2], This->m_state.rgbButtons[1]);
|
||||
|
||||
|
@ -707,7 +707,7 @@ static HRESULT WINAPI SysMouseAImpl_GetDeviceState(
|
|||
LeaveCriticalSection(&(This->crit));
|
||||
return DIERR_GENERIC;
|
||||
}
|
||||
TRACE("Warping mouse to %ld - %ld\n", This->mapped_center.x, This->mapped_center.y);
|
||||
TRACE("Warping mouse to %d - %d\n", This->mapped_center.x, This->mapped_center.y);
|
||||
SetCursorPos( This->mapped_center.x, This->mapped_center.y );
|
||||
This->last_warped = GetCurrentTime();
|
||||
|
||||
|
@ -736,7 +736,7 @@ static HRESULT WINAPI SysMouseAImpl_GetDeviceData(LPDIRECTINPUTDEVICE8A iface,
|
|||
DWORD len;
|
||||
int nqtail = 0;
|
||||
|
||||
TRACE("(%p)->(dods=%ld,dod=%p,entries=%p (%ld)%s,fl=0x%08lx%s)\n",This,dodsize,dod,
|
||||
TRACE("(%p)->(dods=%d,dod=%p,entries=%p (%d)%s,fl=0x%08x%s)\n",This,dodsize,dod,
|
||||
entries, *entries,*entries == INFINITE ? " (INFINITE)" : "",
|
||||
flags, (flags & DIGDD_PEEK) ? " (DIGDD_PEEK)": "" );
|
||||
|
||||
|
@ -756,12 +756,12 @@ static HRESULT WINAPI SysMouseAImpl_GetDeviceData(LPDIRECTINPUTDEVICE8A iface,
|
|||
|
||||
if (!(flags & DIGDD_PEEK)) {
|
||||
if (len)
|
||||
TRACE("Application discarding %ld event(s).\n", len);
|
||||
TRACE("Application discarding %d event(s).\n", len);
|
||||
|
||||
nqtail = This->queue_tail + len;
|
||||
while (nqtail >= This->queue_len) nqtail -= This->queue_len;
|
||||
} else {
|
||||
TRACE("Telling application that %ld event(s) are in the queue.\n", len);
|
||||
TRACE("Telling application that %d event(s) are in the queue.\n", len);
|
||||
}
|
||||
} else {
|
||||
if (dodsize < sizeof(DIDEVICEOBJECTDATA_DX3)) {
|
||||
|
@ -771,13 +771,13 @@ static HRESULT WINAPI SysMouseAImpl_GetDeviceData(LPDIRECTINPUTDEVICE8A iface,
|
|||
}
|
||||
|
||||
if (len)
|
||||
TRACE("Application retrieving %ld event(s):\n", len);
|
||||
TRACE("Application retrieving %d event(s):\n", len);
|
||||
|
||||
*entries = 0;
|
||||
nqtail = This->queue_tail;
|
||||
while (len) {
|
||||
/* Copy the buffered data into the application queue */
|
||||
TRACE(" - queuing Offs:%2ld Data:%5ld TS:%8ld Seq:%8ld at address %p from queue tail %4d\n",
|
||||
TRACE(" - queuing Offs:%2d Data:%5d TS:%8d Seq:%8d at address %p from queue tail %4d\n",
|
||||
(This->data_queue)->dwOfs,
|
||||
(This->data_queue)->dwData,
|
||||
(This->data_queue)->dwTimeStamp,
|
||||
|
@ -802,7 +802,7 @@ static HRESULT WINAPI SysMouseAImpl_GetDeviceData(LPDIRECTINPUTDEVICE8A iface,
|
|||
if (This->need_warp == WARP_NEEDED && (GetCurrentTime() - This->last_warped > 10)) {
|
||||
if(!dinput_window_check(This))
|
||||
return DIERR_GENERIC;
|
||||
TRACE("Warping mouse to %ld - %ld\n", This->mapped_center.x, This->mapped_center.y);
|
||||
TRACE("Warping mouse to %d - %d\n", This->mapped_center.x, This->mapped_center.y);
|
||||
SetCursorPos( This->mapped_center.x, This->mapped_center.y );
|
||||
This->last_warped = GetCurrentTime();
|
||||
|
||||
|
@ -831,7 +831,7 @@ static HRESULT WINAPI SysMouseAImpl_SetProperty(LPDIRECTINPUTDEVICE8A iface,
|
|||
case (DWORD) DIPROP_BUFFERSIZE: {
|
||||
LPCDIPROPDWORD pd = (LPCDIPROPDWORD)ph;
|
||||
|
||||
TRACE("buffersize = %ld\n",pd->dwData);
|
||||
TRACE("buffersize = %d\n", pd->dwData);
|
||||
|
||||
This->data_queue = HeapAlloc(GetProcessHeap(),0, pd->dwData * sizeof(DIDEVICEOBJECTDATA));
|
||||
This->queue_head = 0;
|
||||
|
@ -979,7 +979,7 @@ static HRESULT WINAPI SysMouseAImpl_EnumObjects(
|
|||
SysMouseImpl *This = (SysMouseImpl *)iface;
|
||||
DIDEVICEOBJECTINSTANCEA ddoi;
|
||||
|
||||
TRACE("(this=%p,%p,%p,%08lx)\n", This, lpCallback, lpvRef, dwFlags);
|
||||
TRACE("(this=%p,%p,%p,%08x)\n", This, lpCallback, lpvRef, dwFlags);
|
||||
if (TRACE_ON(dinput)) {
|
||||
TRACE(" - flags = ");
|
||||
_dump_EnumObjects_flags(dwFlags);
|
||||
|
|
Loading…
Reference in New Issue