dinput: Fix printf warnings with long types.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Rémi Bernon 2022-02-08 09:55:39 +01:00 committed by Alexandre Julliard
parent be6d33824a
commit 9f472f00d8
7 changed files with 120 additions and 121 deletions

View File

@ -1,7 +1,7 @@
MODULE = dinput.dll
IMPORTLIB = dinput
IMPORTS = dinput dxguid uuid comctl32 ole32 user32 advapi32 hid setupapi
EXTRADEFS = -DWINE_NO_LONG_TYPES -DDIRECTINPUT_VERSION=0x0700
EXTRADEFS = -DDIRECTINPUT_VERSION=0x0700
C_SRCS = \
ansi.c \

View File

@ -71,14 +71,14 @@ static inline IDirectInputDevice8W *IDirectInputDevice8W_from_impl( struct dinpu
static inline const char *debugstr_didataformat( const DIDATAFORMAT *data )
{
if (!data) return "(null)";
return wine_dbg_sprintf( "%p dwSize %u, dwObjsize %u, dwFlags %#x, dwDataSize %u, dwNumObjs %u, rgodf %p",
return wine_dbg_sprintf( "%p dwSize %lu, dwObjsize %lu, dwFlags %#lx, dwDataSize %lu, dwNumObjs %lu, rgodf %p",
data, data->dwSize, data->dwObjSize, data->dwFlags, data->dwDataSize, data->dwNumObjs, data->rgodf );
}
static inline const char *debugstr_diobjectdataformat( const DIOBJECTDATAFORMAT *data )
{
if (!data) return "(null)";
return wine_dbg_sprintf( "%p pguid %s, dwOfs %#x, dwType %#x, dwFlags %#x", data,
return wine_dbg_sprintf( "%p pguid %s, dwOfs %#lx, dwType %#lx, dwFlags %#lx", data,
debugstr_guid( data->pguid ), data->dwOfs, data->dwType, data->dwFlags );
}
@ -542,8 +542,7 @@ void queue_event( IDirectInputDevice8W *iface, int inst_id, DWORD data, DWORD ti
return;
}
TRACE(" queueing %d at offset %d (queue head %d / size %d)\n",
data, ofs, This->queue_head, This->queue_len);
TRACE( " queueing %lu at offset %u (queue head %u / size %u)\n", data, ofs, This->queue_head, This->queue_len );
This->data_queue[This->queue_head].dwOfs = ofs;
This->data_queue[This->queue_head].dwData = data;
@ -559,7 +558,7 @@ void queue_event( IDirectInputDevice8W *iface, int inst_id, DWORD data, DWORD ti
{
if (This->action_map[i].offset == ofs)
{
TRACE("Offset %d mapped to uAppData %lu\n", ofs, This->action_map[i].uAppData);
TRACE( "Offset %d mapped to uAppData %#Ix\n", ofs, This->action_map[i].uAppData );
This->data_queue[This->queue_head].uAppData = This->action_map[i].uAppData;
break;
}
@ -642,7 +641,7 @@ static HRESULT WINAPI dinput_device_SetDataFormat( IDirectInputDevice8W *iface,
if (TRACE_ON( dinput ))
{
TRACE( "user format %s\n", debugstr_didataformat( format ) );
for (i = 0; i < format->dwNumObjs; ++i) TRACE( " %u: object %s\n", i, debugstr_diobjectdataformat( format->rgodf + i ) );
for (i = 0; i < format->dwNumObjs; ++i) TRACE( " %lu: object %s\n", i, debugstr_diobjectdataformat( format->rgodf + i ) );
}
if (format->dwSize != sizeof(DIDATAFORMAT)) return DIERR_INVALIDPARAM;
@ -672,7 +671,7 @@ static HRESULT WINAPI dinput_device_SetCooperativeLevel( IDirectInputDevice8W *i
struct dinput_device *This = impl_from_IDirectInputDevice8W( iface );
HRESULT hr;
TRACE( "iface %p, hwnd %p, flags %#x.\n", iface, hwnd, flags );
TRACE( "iface %p, hwnd %p, flags %#lx.\n", iface, hwnd, flags );
_dump_cooperativelevel_DI( flags );
@ -771,7 +770,7 @@ static ULONG WINAPI dinput_device_Release( IDirectInputDevice8W *iface )
struct dinput_device *impl = impl_from_IDirectInputDevice8W( iface );
ULONG ref = InterlockedDecrement( &impl->ref );
TRACE( "iface %p, ref %u.\n", iface, ref );
TRACE( "iface %p, ref %lu.\n", iface, ref );
if (!ref)
{
@ -837,7 +836,7 @@ static ULONG WINAPI dinput_device_AddRef( IDirectInputDevice8W *iface )
{
struct dinput_device *impl = impl_from_IDirectInputDevice8W( iface );
ULONG ref = InterlockedIncrement( &impl->ref );
TRACE( "iface %p, ref %u.\n", iface, ref );
TRACE( "iface %p, ref %lu.\n", iface, ref );
return ref;
}
@ -854,7 +853,7 @@ static HRESULT WINAPI dinput_device_EnumObjects( IDirectInputDevice8W *iface,
struct dinput_device *impl = impl_from_IDirectInputDevice8W( iface );
HRESULT hr;
TRACE( "iface %p, callback %p, context %p, flags %#x.\n", iface, callback, context, flags );
TRACE( "iface %p, callback %p, context %p, flags %#lx.\n", iface, callback, context, flags );
if (!callback) return DIERR_INVALIDPARAM;
if (flags & ~(DIDFT_AXIS | DIDFT_POV | DIDFT_BUTTON | DIDFT_NODATA | DIDFT_COLLECTION))
@ -1423,7 +1422,7 @@ static HRESULT WINAPI dinput_device_set_property( IDirectInputDevice8W *iface, c
{
const DIPROPDWORD *value = (const DIPROPDWORD *)header;
TRACE( "buffersize = %d\n", value->dwData );
TRACE( "buffersize %lu\n", value->dwData );
impl->buffersize = value->dwData;
impl->queue_len = min( impl->buffersize, 1024 );
@ -1517,7 +1516,7 @@ static HRESULT WINAPI dinput_device_GetObjectInfo( IDirectInputDevice8W *iface,
};
HRESULT hr;
TRACE( "iface %p, instance %p, obj %#x, how %#x.\n", iface, instance, obj, how );
TRACE( "iface %p, instance %p, obj %#lx, how %#lx.\n", iface, instance, obj, how );
if (!instance) return E_POINTER;
if (instance->dwSize != sizeof(DIDEVICEOBJECTINSTANCE_DX3W) && instance->dwSize != sizeof(DIDEVICEOBJECTINSTANCEW))
@ -1546,7 +1545,7 @@ static HRESULT WINAPI dinput_device_GetDeviceState( IDirectInputDevice8W *iface,
};
HRESULT hr;
TRACE( "iface %p, size %u, data %p.\n", iface, size, data );
TRACE( "iface %p, size %lu, data %p.\n", iface, size, data );
if (!data) return DIERR_INVALIDPARAM;
@ -1602,7 +1601,7 @@ static HRESULT WINAPI dinput_device_GetDeviceData( IDirectInputDevice8W *iface,
HRESULT ret = DI_OK;
int len;
TRACE( "iface %p, size %u, data %p, count %p, flags %#x.\n", iface, size, data, count, flags );
TRACE( "iface %p, size %lu, data %p, count %p, flags %#lx.\n", iface, size, data, count, flags );
if (This->dinput->dwVersion == 0x0800 || size == sizeof(DIDEVICEOBJECTDATA_DX3))
{
@ -1646,20 +1645,20 @@ static HRESULT WINAPI dinput_device_GetDeviceData( IDirectInputDevice8W *iface,
LeaveCriticalSection(&This->crit);
TRACE( "Returning %d events queued\n", *count );
TRACE( "Returning %lu events queued\n", *count );
return ret;
}
static HRESULT WINAPI dinput_device_RunControlPanel( IDirectInputDevice8W *iface, HWND hwnd, DWORD flags )
{
FIXME( "iface %p, hwnd %p, flags %#x stub!\n", iface, hwnd, flags );
FIXME( "iface %p, hwnd %p, flags %#lx stub!\n", iface, hwnd, flags );
return DI_OK;
}
static HRESULT WINAPI dinput_device_Initialize( IDirectInputDevice8W *iface, HINSTANCE instance,
DWORD version, const GUID *guid )
{
FIXME( "iface %p, instance %p, version %#x, guid %s stub!\n", iface, instance, version,
FIXME( "iface %p, instance %p, version %#lx, guid %s stub!\n", iface, instance, version,
debugstr_guid( guid ) );
return DI_OK;
}
@ -1704,7 +1703,7 @@ static HRESULT WINAPI dinput_device_EnumEffects( IDirectInputDevice8W *iface, LP
DIEFFECTINFOW info = {.dwSize = sizeof(info)};
HRESULT hr;
TRACE( "iface %p, callback %p, context %p, type %#x.\n", iface, callback, context, type );
TRACE( "iface %p, callback %p, context %p, type %#lx.\n", iface, callback, context, type );
if (!callback) return DIERR_INVALIDPARAM;
@ -1808,7 +1807,7 @@ static HRESULT WINAPI dinput_device_SendForceFeedbackCommand( IDirectInputDevice
struct dinput_device *impl = impl_from_IDirectInputDevice8W( iface );
HRESULT hr;
TRACE( "iface %p, command %#x.\n", iface, command );
TRACE( "iface %p, command %#lx.\n", iface, command );
switch (command)
{
@ -1838,7 +1837,7 @@ static HRESULT WINAPI dinput_device_EnumCreatedEffectObjects( IDirectInputDevice
{
struct dinput_device *impl = impl_from_IDirectInputDevice8W( iface );
TRACE( "iface %p, callback %p, context %p, flags %#x.\n", iface, callback, context, flags );
TRACE( "iface %p, callback %p, context %p, flags %#lx.\n", iface, callback, context, flags );
if (!callback) return DIERR_INVALIDPARAM;
if (flags) return DIERR_INVALIDPARAM;
@ -1872,7 +1871,7 @@ static HRESULT WINAPI dinput_device_Poll( IDirectInputDevice8W *iface )
static HRESULT WINAPI dinput_device_SendDeviceData( IDirectInputDevice8W *iface, DWORD size,
const DIDEVICEOBJECTDATA *data, DWORD *count, DWORD flags )
{
FIXME( "iface %p, size %u, data %p, count %p, flags %#x stub!\n", iface, size, data, count, flags );
FIXME( "iface %p, size %lu, data %p, count %p, flags %#lx stub!\n", iface, size, data, count, flags );
return DI_OK;
}
@ -1880,7 +1879,7 @@ static HRESULT WINAPI dinput_device_EnumEffectsInFile( IDirectInputDevice8W *ifa
LPDIENUMEFFECTSINFILECALLBACK callback,
void *context, DWORD flags )
{
FIXME( "iface %p, filename %s, callback %p, context %p, flags %#x stub!\n", iface,
FIXME( "iface %p, filename %s, callback %p, context %p, flags %#lx stub!\n", iface,
debugstr_w(filename), callback, context, flags );
return DI_OK;
}
@ -1888,7 +1887,7 @@ static HRESULT WINAPI dinput_device_EnumEffectsInFile( IDirectInputDevice8W *ifa
static HRESULT WINAPI dinput_device_WriteEffectToFile( IDirectInputDevice8W *iface, const WCHAR *filename,
DWORD count, DIFILEEFFECT *effects, DWORD flags )
{
FIXME( "iface %p, filename %s, count %u, effects %p, flags %#x stub!\n", iface,
FIXME( "iface %p, filename %s, count %lu, effects %p, flags %#lx stub!\n", iface,
debugstr_w(filename), count, effects, flags );
return DI_OK;
}
@ -1904,7 +1903,7 @@ static HRESULT WINAPI dinput_device_BuildActionMap( IDirectInputDevice8W *iface,
DWORD devMask;
int i;
FIXME( "iface %p, format %p, username %s, flags %#x semi-stub!\n", iface, format,
FIXME( "iface %p, format %p, username %s, flags %#lx stub!\n", iface, format,
debugstr_w(username), flags );
if (!format) return DIERR_INVALIDPARAM;
@ -1976,7 +1975,7 @@ static HRESULT WINAPI dinput_device_BuildActionMap( IDirectInputDevice8W *iface,
if (!has_actions) return DI_NOEFFECT;
if (flags & (DIDBAM_DEFAULT|DIDBAM_PRESERVE|DIDBAM_INITIALIZE|DIDBAM_HWDEFAULTS))
FIXME("Unimplemented flags %#x\n", flags);
FIXME( "Unimplemented flags %#lx\n", flags );
return DI_OK;
}
@ -1996,7 +1995,7 @@ static HRESULT WINAPI dinput_device_SetActionMap( IDirectInputDevice8W *iface, D
const DIDATAFORMAT *df;
ActionMap *action_map;
FIXME( "iface %p, format %p, username %s, flags %#x semi-stub!\n", iface, format,
FIXME( "iface %p, format %p, username %s, flags %#lx stub!\n", iface, format,
debugstr_w(username), flags );
if (!format) return DIERR_INVALIDPARAM;
@ -2261,7 +2260,7 @@ HRESULT dinput_device_init( IDirectInputDevice8W *iface )
if (TRACE_ON( dinput ))
{
TRACE( "device format %s\n", debugstr_didataformat( format ) );
for (i = 0; i < format->dwNumObjs; ++i) TRACE( " %u: object %s\n", i, debugstr_diobjectdataformat( format->rgodf + i ) );
for (i = 0; i < format->dwNumObjs; ++i) TRACE( " %lu: object %s\n", i, debugstr_diobjectdataformat( format->rgodf + i ) );
}
return DI_OK;

View File

@ -165,7 +165,7 @@ HRESULT WINAPI DirectInputCreateEx( HINSTANCE hinst, DWORD version, REFIID iid,
IUnknown *unknown;
HRESULT hr;
TRACE( "hinst %p, version %#x, iid %s, out %p, outer %p.\n", hinst, version, debugstr_guid( iid ), out, outer );
TRACE( "hinst %p, version %#lx, iid %s, out %p, outer %p.\n", hinst, version, debugstr_guid( iid ), out, outer );
if (!IsEqualGUID( &IID_IDirectInputA, iid ) &&
!IsEqualGUID( &IID_IDirectInputW, iid ) &&
@ -198,7 +198,7 @@ HRESULT WINAPI DECLSPEC_HOTPATCH DirectInput8Create( HINSTANCE hinst, DWORD vers
IUnknown *unknown;
HRESULT hr;
TRACE( "hinst %p, version %#x, iid %s, out %p, outer %p.\n", hinst, version, debugstr_guid( iid ), out, outer );
TRACE( "hinst %p, version %#lx, iid %s, out %p, outer %p.\n", hinst, version, debugstr_guid( iid ), out, outer );
if (!out) return E_POINTER;
@ -295,7 +295,7 @@ static HRESULT WINAPI dinput7_EnumDevices( IDirectInput7W *iface, DWORD type, LP
{
struct dinput *impl = impl_from_IDirectInput7W( iface );
TRACE( "iface %p, type %#x, callback %p, context %p, flags %#x.\n", iface, type, callback, context, flags );
TRACE( "iface %p, type %#lx, callback %p, context %p, flags %#lx.\n", iface, type, callback, context, flags );
if (!callback) return DIERR_INVALIDPARAM;
@ -310,7 +310,7 @@ static ULONG WINAPI dinput7_AddRef( IDirectInput7W *iface )
{
struct dinput *impl = impl_from_IDirectInput7W( iface );
ULONG ref = InterlockedIncrement( &impl->ref );
TRACE( "iface %p increasing refcount to %u.\n", iface, ref );
TRACE( "iface %p increasing refcount to %lu.\n", iface, ref );
return ref;
}
@ -319,7 +319,7 @@ static ULONG WINAPI dinput7_Release( IDirectInput7W *iface )
struct dinput *impl = impl_from_IDirectInput7W( iface );
ULONG ref = InterlockedDecrement( &impl->ref );
TRACE( "iface %p decreasing refcount to %u.\n", iface, ref );
TRACE( "iface %p decreasing refcount to %lu.\n", iface, ref );
if (ref == 0)
{
@ -380,7 +380,7 @@ static LRESULT WINAPI di_em_win_wndproc(HWND hwnd, UINT msg, WPARAM wparam, LPAR
UINT size = sizeof(ri);
int rim = GET_RAWINPUT_CODE_WPARAM( wparam );
TRACE( "%p %d %lx %lx\n", hwnd, msg, wparam, lparam );
TRACE( "%p %d %Ix %Ix\n", hwnd, msg, wparam, lparam );
if (msg == WM_INPUT && (rim == RIM_INPUT || rim == RIM_INPUTSINK))
{
@ -462,7 +462,7 @@ static HRESULT WINAPI dinput7_Initialize( IDirectInput7W *iface, HINSTANCE hinst
{
struct dinput *impl = impl_from_IDirectInput7W( iface );
TRACE( "iface %p, hinst %p, version %#x.\n", iface, hinst, version );
TRACE( "iface %p, hinst %p, version %#lx.\n", iface, hinst, version );
if (!hinst)
return DIERR_INVALIDPARAM;
@ -505,7 +505,7 @@ static HRESULT WINAPI dinput7_RunControlPanel( IDirectInput7W *iface, HWND owner
STARTUPINFOW si = {0};
PROCESS_INFORMATION pi;
TRACE( "iface %p, owner %p, flags %#x.\n", iface, owner, flags );
TRACE( "iface %p, owner %p, flags %#lx.\n", iface, owner, flags );
if (owner && !IsWindow( owner )) return E_HANDLE;
if (flags) return DIERR_INVALIDPARAM;
@ -604,7 +604,7 @@ static HRESULT WINAPI dinput8_EnumDevices( IDirectInput8W *iface, DWORD type, LP
unsigned int i = 0;
HRESULT hr;
TRACE( "iface %p, type %#x, callback %p, context %p, flags %#x.\n", iface, type, callback, context, flags );
TRACE( "iface %p, type %#lx, callback %p, context %p, flags %#lx.\n", iface, type, callback, context, flags );
if (!callback) return DIERR_INVALIDPARAM;
@ -662,7 +662,7 @@ static HRESULT WINAPI dinput8_Initialize( IDirectInput8W *iface, HINSTANCE hinst
{
struct dinput *impl = impl_from_IDirectInput8W( iface );
TRACE( "iface %p, hinst %p, version %#x.\n", iface, hinst, version );
TRACE( "iface %p, hinst %p, version %#lx.\n", iface, hinst, version );
if (!hinst)
return DIERR_INVALIDPARAM;
@ -762,7 +762,7 @@ static HRESULT WINAPI dinput8_EnumDevicesBySemantics( IDirectInput8W *iface, con
HRESULT hr;
int remain;
FIXME( "iface %p, username %s, action_format %p, callback %p, context %p, flags %#x stub!\n",
FIXME( "iface %p, username %s, action_format %p, callback %p, context %p, flags %#lx stub!\n",
iface, debugstr_w(username), action_format, callback, context, flags );
didevi.dwSize = sizeof(didevi);
@ -828,7 +828,7 @@ static HRESULT WINAPI dinput8_EnumDevicesBySemantics( IDirectInput8W *iface, con
static HRESULT WINAPI dinput8_ConfigureDevices( IDirectInput8W *iface, LPDICONFIGUREDEVICESCALLBACK callback,
DICONFIGUREDEVICESPARAMSW *params, DWORD flags, void *context )
{
FIXME( "iface %p, callback %p, params %p, flags %#x, context %p stub!\n", iface, callback,
FIXME( "iface %p, callback %p, params %p, flags %#lx, context %p stub!\n", iface, callback,
params, flags, context );
/* Call helper function in config.c to do the real work */
@ -876,7 +876,7 @@ static HRESULT WINAPI joy_config_Unacquire( IDirectInputJoyConfig8 *iface )
static HRESULT WINAPI joy_config_SetCooperativeLevel( IDirectInputJoyConfig8 *iface, HWND hwnd, DWORD flags )
{
FIXME( "iface %p, hwnd %p, flags %#x stub!\n", iface, hwnd, flags );
FIXME( "iface %p, hwnd %p, flags %#lx stub!\n", iface, hwnd, flags );
return E_NOTIMPL;
}
@ -895,14 +895,14 @@ static HRESULT WINAPI joy_config_EnumTypes( IDirectInputJoyConfig8 *iface, LPDIJ
static HRESULT WINAPI joy_config_GetTypeInfo( IDirectInputJoyConfig8 *iface, const WCHAR *name,
DIJOYTYPEINFO *info, DWORD flags )
{
FIXME( "iface %p, name %s, info %p, flags %#x stub!\n", iface, debugstr_w(name), info, flags );
FIXME( "iface %p, name %s, info %p, flags %#lx stub!\n", iface, debugstr_w(name), info, flags );
return E_NOTIMPL;
}
static HRESULT WINAPI joy_config_SetTypeInfo( IDirectInputJoyConfig8 *iface, const WCHAR *name,
const DIJOYTYPEINFO *info, DWORD flags, WCHAR *new_name )
{
FIXME( "iface %p, name %s, info %p, flags %#x, new_name %s stub!\n",
FIXME( "iface %p, name %s, info %p, flags %#lx, new_name %s stub!\n",
iface, debugstr_w(name), info, flags, debugstr_w(new_name) );
return E_NOTIMPL;
}
@ -933,7 +933,7 @@ static HRESULT WINAPI joy_config_GetConfig( IDirectInputJoyConfig8 *iface, UINT
struct find_device_from_index_params params = {.index = id};
HRESULT hr;
FIXME( "iface %p, id %u, info %p, flags %#x stub!\n", iface, id, info, flags );
FIXME( "iface %p, id %u, info %p, flags %#lx stub!\n", iface, id, info, flags );
#define X(x) if (flags & x) FIXME("\tflags |= "#x"\n");
X(DIJC_GUIDINSTANCE)
@ -952,7 +952,7 @@ static HRESULT WINAPI joy_config_GetConfig( IDirectInputJoyConfig8 *iface, UINT
static HRESULT WINAPI joy_config_SetConfig( IDirectInputJoyConfig8 *iface, UINT id, const DIJOYCONFIG *info, DWORD flags )
{
FIXME( "iface %p, id %u, info %p, flags %#x stub!\n", iface, id, info, flags );
FIXME( "iface %p, id %u, info %p, flags %#lx stub!\n", iface, id, info, flags );
return E_NOTIMPL;
}
@ -964,13 +964,13 @@ static HRESULT WINAPI joy_config_DeleteConfig( IDirectInputJoyConfig8 *iface, UI
static HRESULT WINAPI joy_config_GetUserValues( IDirectInputJoyConfig8 *iface, DIJOYUSERVALUES *info, DWORD flags )
{
FIXME( "iface %p, info %p, flags %#x stub!\n", iface, info, flags );
FIXME( "iface %p, info %p, flags %#lx stub!\n", iface, info, flags );
return E_NOTIMPL;
}
static HRESULT WINAPI joy_config_SetUserValues( IDirectInputJoyConfig8 *iface, const DIJOYUSERVALUES *info, DWORD flags )
{
FIXME( "iface %p, info %p, flags %#x stub!\n", iface, info, flags );
FIXME( "iface %p, info %p, flags %#lx stub!\n", iface, info, flags );
return E_NOTIMPL;
}
@ -982,7 +982,7 @@ static HRESULT WINAPI joy_config_AddNewHardware( IDirectInputJoyConfig8 *iface,
static HRESULT WINAPI joy_config_OpenTypeKey( IDirectInputJoyConfig8 *iface, const WCHAR *name, DWORD security, HKEY *key )
{
FIXME( "iface %p, name %s, security %u, key %p stub!\n", iface, debugstr_w(name), security, key );
FIXME( "iface %p, name %s, security %lu, key %p stub!\n", iface, debugstr_w(name), security, key );
return E_NOTIMPL;
}
@ -1150,13 +1150,13 @@ static LRESULT CALLBACK LL_hook_proc( int code, WPARAM wparam, LPARAM lparam )
EnterCriticalSection( &dinput_hook_crit );
LIST_FOR_EACH_ENTRY( impl, &acquired_mouse_list, struct dinput_device, entry )
{
TRACE( "calling dinput_mouse_hook (%p %lx %lx)\n", impl, wparam, lparam );
TRACE( "calling dinput_mouse_hook (%p %Ix %Ix)\n", impl, wparam, lparam );
skip |= dinput_mouse_hook( &impl->IDirectInputDevice8W_iface, wparam, lparam );
}
LIST_FOR_EACH_ENTRY( impl, &acquired_keyboard_list, struct dinput_device, entry )
{
if (impl->use_raw_input) continue;
TRACE( "calling dinput_keyboard_hook (%p %lx %lx)\n", impl, wparam, lparam );
TRACE( "calling dinput_keyboard_hook (%p %Ix %Ix)\n", impl, wparam, lparam );
skip |= dinput_keyboard_hook( &impl->IDirectInputDevice8W_iface, wparam, lparam );
}
LeaveCriticalSection( &dinput_hook_crit );
@ -1263,7 +1263,7 @@ static DWORD WINAPI dinput_thread_proc( void *params )
finished_event = (HANDLE)msg.lParam;
TRACE( "Processing hook change notification wp:%ld lp:%#lx\n", msg.wParam, msg.lParam );
TRACE( "Processing hook change notification wparam %#Ix, lparam %#Ix.\n", msg.wParam, msg.lParam );
if (!msg.wParam)
{
@ -1308,7 +1308,7 @@ static DWORD WINAPI dinput_thread_proc( void *params )
LeaveCriticalSection( &dinput_hook_crit );
}
if (ret != events_count) ERR("Unexpected termination, ret %#x\n", ret);
if (ret != events_count) ERR("Unexpected termination, ret %#lx\n", ret);
done:
DestroyWindow( di_em_win );
@ -1321,10 +1321,10 @@ static BOOL WINAPI dinput_thread_start_once( INIT_ONCE *once, void *param, void
HANDLE start_event;
start_event = CreateEventW( NULL, FALSE, FALSE, NULL );
if (!start_event) ERR( "failed to create start event, error %u\n", GetLastError() );
if (!start_event) ERR( "failed to create start event, error %lu\n", GetLastError() );
dinput_thread = CreateThread( NULL, 0, dinput_thread_proc, start_event, 0, &dinput_thread_id );
if (!dinput_thread) ERR( "failed to create internal thread, error %u\n", GetLastError() );
if (!dinput_thread) ERR( "failed to create internal thread, error %lu\n", GetLastError() );
WaitForSingleObject( start_event, INFINITE );
CloseHandle( start_event );
@ -1426,7 +1426,7 @@ void check_dinput_events(void)
BOOL WINAPI DllMain( HINSTANCE inst, DWORD reason, void *reserved )
{
TRACE( "inst %p, reason %u, reserved %p.\n", inst, reason, reserved );
TRACE( "inst %p, reason %lu, reserved %p.\n", inst, reason, reserved );
switch(reason)
{

View File

@ -55,19 +55,19 @@ DEFINE_DEVPROPKEY( DEVPROPKEY_HID_HANDLE, 0xbc62e415, 0xf4fe, 0x405c, 0x8e, 0xda
struct pid_control_report
{
BYTE id;
ULONG collection;
ULONG control_coll;
UINT collection;
UINT control_coll;
};
struct pid_effect_update
{
BYTE id;
ULONG collection;
ULONG type_coll;
ULONG axes_coll;
ULONG axis_count;
ULONG direction_coll;
ULONG direction_count;
UINT collection;
UINT type_coll;
UINT axes_coll;
UINT axis_count;
UINT direction_coll;
UINT direction_count;
struct hid_value_caps *axis_caps[6];
struct hid_value_caps *direction_caps[6];
struct hid_value_caps *duration_caps;
@ -81,7 +81,7 @@ struct pid_effect_update
struct pid_set_periodic
{
BYTE id;
ULONG collection;
UINT collection;
struct hid_value_caps *magnitude_caps;
struct hid_value_caps *period_caps;
struct hid_value_caps *phase_caps;
@ -91,7 +91,7 @@ struct pid_set_periodic
struct pid_set_envelope
{
BYTE id;
ULONG collection;
UINT collection;
struct hid_value_caps *attack_level_caps;
struct hid_value_caps *attack_time_caps;
struct hid_value_caps *fade_level_caps;
@ -101,7 +101,7 @@ struct pid_set_envelope
struct pid_set_condition
{
BYTE id;
ULONG collection;
UINT collection;
struct hid_value_caps *center_point_offset_caps;
struct hid_value_caps *positive_coefficient_caps;
struct hid_value_caps *negative_coefficient_caps;
@ -113,14 +113,14 @@ struct pid_set_condition
struct pid_set_constant_force
{
BYTE id;
ULONG collection;
UINT collection;
struct hid_value_caps *magnitude_caps;
};
struct pid_set_ramp_force
{
BYTE id;
ULONG collection;
UINT collection;
struct hid_value_caps *start_caps;
struct hid_value_caps *end_caps;
};
@ -128,41 +128,41 @@ struct pid_set_ramp_force
struct pid_device_gain
{
BYTE id;
ULONG collection;
UINT collection;
struct hid_value_caps *device_gain_caps;
};
struct pid_device_pool
{
BYTE id;
ULONG collection;
UINT collection;
struct hid_value_caps *device_managed_caps;
};
struct pid_block_free
{
BYTE id;
ULONG collection;
UINT collection;
};
struct pid_block_load
{
BYTE id;
ULONG collection;
ULONG status_coll;
UINT collection;
UINT status_coll;
};
struct pid_new_effect
{
BYTE id;
ULONG collection;
ULONG type_coll;
UINT collection;
UINT type_coll;
};
struct pid_effect_state
{
BYTE id;
ULONG collection;
UINT collection;
};
struct hid_joystick
@ -182,7 +182,7 @@ struct hid_joystick
char *output_report_buf;
char *feature_report_buf;
USAGE_AND_PAGE *usages_buf;
ULONG usages_count;
UINT usages_count;
BYTE effect_inuse[255];
struct list effect_list;
@ -415,7 +415,7 @@ static const WCHAR *object_usage_to_string( DIDEVICEOBJECTINSTANCEW *instance )
}
}
static HRESULT find_next_effect_id( struct hid_joystick *impl, DWORD *index, USAGE type )
static HRESULT find_next_effect_id( struct hid_joystick *impl, ULONG *index, USAGE type )
{
struct pid_device_pool *device_pool = &impl->pid_device_pool;
struct pid_new_effect *new_effect = &impl->pid_new_effect;
@ -491,7 +491,7 @@ static BOOL enum_object( struct hid_joystick *impl, const DIPROPHEADER *filter,
if (LOWORD( filter->dwObj ) != instance->wUsage) return DIENUM_CONTINUE;
return callback( impl, caps, instance, data );
default:
FIXME( "unimplemented filter dwHow %#x dwObj %#x\n", filter->dwHow, filter->dwObj );
FIXME( "unimplemented filter dwHow %#lx dwObj %#lx\n", filter->dwHow, filter->dwObj );
break;
}
@ -759,7 +759,7 @@ static void set_report_value( struct hid_joystick *impl, char *report_buf,
status = HidP_SetUsageValue( HidP_Output, caps->usage_page, caps->link_collection,
caps->usage_min, value, preparsed, report_buf, report_len );
if (status != HIDP_STATUS_SUCCESS) WARN( "HidP_SetUsageValue %04x:%04x returned %#x\n",
if (status != HIDP_STATUS_SUCCESS) WARN( "HidP_SetUsageValue %04x:%04x returned %#lx\n",
caps->usage_page, caps->usage_min, status );
}
@ -767,14 +767,14 @@ static void hid_joystick_addref( IDirectInputDevice8W *iface )
{
struct hid_joystick *impl = impl_from_IDirectInputDevice8W( iface );
ULONG ref = InterlockedIncrement( &impl->internal_ref );
TRACE( "iface %p, internal ref %u.\n", iface, ref );
TRACE( "iface %p, internal ref %lu.\n", iface, ref );
}
static void hid_joystick_release( IDirectInputDevice8W *iface )
{
struct hid_joystick *impl = impl_from_IDirectInputDevice8W( iface );
ULONG ref = InterlockedDecrement( &impl->internal_ref );
TRACE( "iface %p, internal ref %u.\n", iface, ref );
TRACE( "iface %p, internal ref %lu.\n", iface, ref );
if (!ref)
{
@ -899,7 +899,7 @@ static HRESULT hid_joystick_unacquire( IDirectInputDevice8W *iface )
if (impl->device == INVALID_HANDLE_VALUE) return DI_NOEFFECT;
ret = CancelIoEx( impl->device, &impl->read_ovl );
if (!ret) WARN( "CancelIoEx failed, last error %u\n", GetLastError() );
if (!ret) WARN( "CancelIoEx failed, last error %lu\n", GetLastError() );
else WaitForSingleObject( impl->base.read_event, INFINITE );
if (!(impl->base.caps.dwFlags & DIDC_FORCEFEEDBACK)) return DI_OK;
@ -975,7 +975,7 @@ static HRESULT hid_joystick_get_effect_info( IDirectInputDevice8W *iface, DIEFFE
usage, &button, &count, preparsed );
if (status != HIDP_STATUS_SUCCESS)
{
WARN( "HidP_GetSpecificButtonCaps %#x returned %#x\n", usage, status );
WARN( "HidP_GetSpecificButtonCaps %#x returned %#lx\n", usage, status );
return DIERR_DEVICENOTREG;
}
else if (!count)
@ -1046,7 +1046,7 @@ static HRESULT hid_joystick_send_force_feedback_command( IDirectInputDevice8W *i
USAGE usage;
ULONG count;
TRACE( "iface %p, flags %x.\n", iface, command );
TRACE( "iface %p, command %#lx.\n", iface, command );
switch (command)
{
@ -1085,7 +1085,7 @@ static HRESULT hid_joystick_enum_created_effect_objects( IDirectInputDevice8W *i
struct hid_joystick *impl = impl_from_IDirectInputDevice8W( iface );
struct hid_joystick_effect *effect, *next;
TRACE( "iface %p, callback %p, context %p, flags %#x.\n", iface, callback, context, flags );
TRACE( "iface %p, callback %p, context %p, flags %#lx.\n", iface, callback, context, flags );
LIST_FOR_EACH_ENTRY_SAFE(effect, next, &impl->effect_list, struct hid_joystick_effect, entry)
if (callback( &effect->IDirectInputEffect_iface, context ) != DIENUM_CONTINUE) break;
@ -1189,7 +1189,7 @@ static BOOL read_device_state_value( struct hid_joystick *impl, struct hid_value
status = HidP_GetUsageValue( HidP_Input, instance->wUsagePage, 0, instance->wUsage,
&logical_value, impl->preparsed, report_buf, report_len );
if (status != HIDP_STATUS_SUCCESS) WARN( "HidP_GetUsageValue %04x:%04x returned %#x\n",
if (status != HIDP_STATUS_SUCCESS) WARN( "HidP_GetUsageValue %04x:%04x returned %#lx\n",
instance->wUsagePage, instance->wUsage, status );
if (instance->dwType & DIDFT_AXIS) value = scale_axis_value( logical_value, properties );
else value = scale_value( logical_value, properties );
@ -1216,7 +1216,7 @@ static HRESULT hid_joystick_read( IDirectInputDevice8W *iface )
char *report_buf = impl->input_report_buf;
struct parse_device_state_params params;
struct hid_joystick_effect *effect;
DWORD device_state, effect_state;
UINT device_state, effect_state;
USAGE_AND_PAGE *usages;
NTSTATUS status;
HRESULT hr;
@ -1225,11 +1225,11 @@ static HRESULT hid_joystick_read( IDirectInputDevice8W *iface )
ret = GetOverlappedResult( impl->device, &impl->read_ovl, &count, FALSE );
if (ret && TRACE_ON(dinput))
{
TRACE( "read size %u report:\n", count );
TRACE( "read size %lu report:\n", count );
for (i = 0; i < count;)
{
char buffer[256], *buf = buffer;
buf += sprintf(buf, "%08x ", i);
buf += sprintf(buf, "%08lx ", i);
do
{
buf += sprintf(buf, " %02x", (BYTE)report_buf[i] );
@ -1245,7 +1245,7 @@ static HRESULT hid_joystick_read( IDirectInputDevice8W *iface )
memset( impl->usages_buf, 0, count * sizeof(*impl->usages_buf) );
status = HidP_GetUsagesEx( HidP_Input, 0, impl->usages_buf, &count,
impl->preparsed, report_buf, report_len );
if (status != HIDP_STATUS_SUCCESS) WARN( "HidP_GetUsagesEx returned %#x\n", status );
if (status != HIDP_STATUS_SUCCESS) WARN( "HidP_GetUsagesEx returned %#lx\n", status );
if (report_buf[0] == impl->base.device_state_report_id)
{
@ -1275,7 +1275,7 @@ static HRESULT hid_joystick_read( IDirectInputDevice8W *iface )
{
status = HidP_GetUsageValue( HidP_Input, HID_USAGE_PAGE_PID, 0, PID_USAGE_EFFECT_BLOCK_INDEX,
&index, impl->preparsed, report_buf, report_len );
if (status != HIDP_STATUS_SUCCESS) WARN( "HidP_GetUsageValue EFFECT_BLOCK_INDEX returned %#x\n", status );
if (status != HIDP_STATUS_SUCCESS) WARN( "HidP_GetUsageValue EFFECT_BLOCK_INDEX returned %#lx\n", status );
EnterCriticalSection( &impl->base.crit );
effect_state = 0;
@ -1301,7 +1301,7 @@ static HRESULT hid_joystick_read( IDirectInputDevice8W *iface )
if (!(device_state & DIGFFS_USERFFSWITCHON)) device_state |= DIGFFS_USERFFSWITCHOFF;
if (!(device_state & DIGFFS_POWERON)) device_state |= DIGFFS_POWEROFF;
TRACE( "effect %u state %#x, device state %#x\n", index, effect_state, device_state );
TRACE( "effect %lu state %#x, device state %#x\n", index, effect_state, device_state );
LIST_FOR_EACH_ENTRY( effect, &impl->effect_list, struct hid_joystick_effect, entry )
if (effect->index == index) effect->status = effect_state;
@ -1317,7 +1317,7 @@ static HRESULT hid_joystick_read( IDirectInputDevice8W *iface )
if (GetLastError() == ERROR_IO_PENDING || GetLastError() == ERROR_OPERATION_ABORTED) hr = DI_OK;
else
{
WARN( "GetOverlappedResult/ReadFile failed, error %u\n", GetLastError() );
WARN( "GetOverlappedResult/ReadFile failed, error %lu\n", GetLastError() );
CloseHandle(impl->device);
impl->device = INVALID_HANDLE_VALUE;
hr = DIERR_INPUTLOST;
@ -1629,7 +1629,7 @@ HRESULT hid_joystick_enum_device( DWORD type, DWORD flags, DIDEVICEINSTANCEW *in
HANDLE device;
HRESULT hr;
TRACE( "type %#x, flags %#x, instance %p, version %#04x, index %d\n", type, flags, instance, version, index );
TRACE( "type %#lx, flags %#lx, instance %p, version %#lx, index %d\n", type, flags, instance, version, index );
hr = hid_joystick_device_open( index, instance, device_path, &device, &preparsed,
&attrs, &caps, version );
@ -2120,7 +2120,7 @@ static ULONG WINAPI hid_joystick_effect_AddRef( IDirectInputEffect *iface )
{
struct hid_joystick_effect *impl = impl_from_IDirectInputEffect( iface );
ULONG ref = InterlockedIncrement( &impl->ref );
TRACE( "iface %p, ref %u.\n", iface, ref );
TRACE( "iface %p, ref %lu.\n", iface, ref );
return ref;
}
@ -2128,7 +2128,7 @@ static ULONG WINAPI hid_joystick_effect_Release( IDirectInputEffect *iface )
{
struct hid_joystick_effect *impl = impl_from_IDirectInputEffect( iface );
ULONG ref = InterlockedDecrement( &impl->ref );
TRACE( "iface %p, ref %u.\n", iface, ref );
TRACE( "iface %p, ref %lu.\n", iface, ref );
if (!ref)
{
IDirectInputEffect_Unload( iface );
@ -2154,7 +2154,7 @@ static HRESULT WINAPI hid_joystick_effect_Initialize( IDirectInputEffect *iface,
NTSTATUS status;
USAGE type;
TRACE( "iface %p, inst %p, version %u, guid %s\n", iface, inst, version, debugstr_guid( guid ) );
TRACE( "iface %p, inst %p, version %#lx, guid %s\n", iface, inst, version, debugstr_guid( guid ) );
if (!inst) return DIERR_INVALIDPARAM;
if (!guid) return E_POINTER;
@ -2409,7 +2409,7 @@ static HRESULT WINAPI hid_joystick_effect_GetParameters( IDirectInputEffect *ifa
ULONG i, count, capacity, object_flags, direction_flags;
BOOL ret;
TRACE( "iface %p, params %p, flags %#x.\n", iface, params, flags );
TRACE( "iface %p, params %p, flags %#lx.\n", iface, params, flags );
if (!params) return DI_OK;
if (params->dwSize != sizeof(DIEFFECT_DX6) && params->dwSize != sizeof(DIEFFECT_DX5)) return DIERR_INVALIDPARAM;
@ -2521,7 +2521,7 @@ static HRESULT WINAPI hid_joystick_effect_SetParameters( IDirectInputEffect *ifa
HRESULT hr;
BOOL ret;
TRACE( "iface %p, params %p, flags %#x.\n", iface, params, flags );
TRACE( "iface %p, params %p, flags %#lx.\n", iface, params, flags );
if (!params) return E_POINTER;
if (params->dwSize != sizeof(DIEFFECT_DX6) && params->dwSize != sizeof(DIEFFECT_DX5)) return DIERR_INVALIDPARAM;
@ -2680,7 +2680,7 @@ static HRESULT WINAPI hid_joystick_effect_Start( IDirectInputEffect *iface, DWOR
USAGE control;
HRESULT hr;
TRACE( "iface %p, iterations %u, flags %#x.\n", iface, iterations, flags );
TRACE( "iface %p, iterations %lu, flags %#lx.\n", iface, iterations, flags );
if ((flags & ~(DIES_NODOWNLOAD|DIES_SOLO))) return DIERR_INVALIDPARAM;
if (flags & DIES_SOLO) control = PID_USAGE_OP_EFFECT_START_SOLO;
@ -2803,7 +2803,7 @@ static void set_parameter_value_angle( struct hid_joystick_effect *impl, char *r
LONG exp;
if (!caps) return;
exp = caps->units_exp;
if (caps->units != 0x14) WARN( "unknown angle unit caps %x\n", caps->units );
if (caps->units != 0x14) WARN( "unknown angle unit caps %#lx\n", caps->units );
else if (exp < -2) while (exp++ < -2) value *= 10;
else if (exp > -2) while (exp-- > -2) value /= 10;
set_parameter_value( impl, report_buf, caps, value );
@ -2816,7 +2816,7 @@ static void set_parameter_value_us( struct hid_joystick_effect *impl, char *repo
if (!caps) return;
exp = caps->units_exp;
if (value == INFINITE) value = caps->physical_min - 1;
else if (caps->units != 0x1003) WARN( "unknown time unit caps %x\n", caps->units );
else if (caps->units != 0x1003) WARN( "unknown time unit caps %#lx\n", caps->units );
else if (exp < -6) while (exp++ < -6) value *= 10;
else if (exp > -6) while (exp-- > -6) value /= 10;
set_parameter_value( impl, report_buf, caps, value );
@ -2864,12 +2864,12 @@ static HRESULT WINAPI hid_joystick_effect_Download( IDirectInputEffect *iface )
if (!impl->type_specific_buf[0]) status = HIDP_STATUS_SUCCESS;
else status = HidP_SetUsageValue( HidP_Output, HID_USAGE_PAGE_PID, 0, PID_USAGE_EFFECT_BLOCK_INDEX,
impl->index, impl->joystick->preparsed, impl->type_specific_buf, report_len );
if (status != HIDP_STATUS_SUCCESS) WARN( "HidP_SetUsageValue returned %#x\n", status );
if (status != HIDP_STATUS_SUCCESS) WARN( "HidP_SetUsageValue returned %#lx\n", status );
if (!impl->set_envelope_buf[0]) status = HIDP_STATUS_SUCCESS;
else status = HidP_SetUsageValue( HidP_Output, HID_USAGE_PAGE_PID, 0, PID_USAGE_EFFECT_BLOCK_INDEX,
impl->index, impl->joystick->preparsed, impl->set_envelope_buf, report_len );
if (status != HIDP_STATUS_SUCCESS) WARN( "HidP_SetUsageValue returned %#x\n", status );
if (status != HIDP_STATUS_SUCCESS) WARN( "HidP_SetUsageValue returned %#lx\n", status );
status = HidP_SetUsageValue( HidP_Output, HID_USAGE_PAGE_PID, 0, PID_USAGE_EFFECT_BLOCK_INDEX,
impl->index, impl->joystick->preparsed, impl->effect_update_buf, report_len );
@ -2910,7 +2910,7 @@ static HRESULT WINAPI hid_joystick_effect_Download( IDirectInputEffect *iface )
{
status = HidP_SetUsageValue( HidP_Output, HID_USAGE_PAGE_PID, 0, PID_USAGE_PARAMETER_BLOCK_OFFSET,
i, impl->joystick->preparsed, impl->type_specific_buf, report_len );
if (status != HIDP_STATUS_SUCCESS) WARN( "HidP_SetUsageValue %04x:%04x returned %#x\n",
if (status != HIDP_STATUS_SUCCESS) WARN( "HidP_SetUsageValue %04x:%04x returned %#lx\n",
HID_USAGE_PAGE_PID, PID_USAGE_PARAMETER_BLOCK_OFFSET, status );
set_parameter_value( impl, impl->type_specific_buf, set_condition->center_point_offset_caps,
impl->condition[i].lOffset );
@ -2997,7 +2997,7 @@ static HRESULT WINAPI hid_joystick_effect_Download( IDirectInputEffect *iface )
usage = PID_USAGE_DIRECTION_ENABLE;
status = HidP_SetUsages( HidP_Output, HID_USAGE_PAGE_PID, 0, &usage, &count,
impl->joystick->preparsed, impl->effect_update_buf, report_len );
if (status != HIDP_STATUS_SUCCESS) WARN( "HidP_SetUsages returned %#x\n", status );
if (status != HIDP_STATUS_SUCCESS) WARN( "HidP_SetUsages returned %#lx\n", status );
spherical.rglDirection = directions;
convert_directions_to_spherical( &impl->params, &spherical );
@ -3017,7 +3017,7 @@ static HRESULT WINAPI hid_joystick_effect_Download( IDirectInputEffect *iface )
status = HidP_SetUsageValue( HidP_Output, HID_USAGE_PAGE_PID, 0, PID_USAGE_TRIGGER_BUTTON,
impl->params.dwTriggerButton, impl->joystick->preparsed,
impl->effect_update_buf, report_len );
if (status != HIDP_STATUS_SUCCESS) WARN( "HidP_SetUsageValue returned %#x\n", status );
if (status != HIDP_STATUS_SUCCESS) WARN( "HidP_SetUsageValue returned %#lx\n", status );
if (!WriteFile( device, impl->effect_update_buf, report_len, NULL, NULL )) hr = DIERR_INPUTLOST;
else impl->modified = 0;

View File

@ -95,8 +95,8 @@ int dinput_keyboard_hook( IDirectInputDevice8W *iface, WPARAM wparam, LPARAM lpa
wparam != WM_SYSKEYDOWN && wparam != WM_SYSKEYUP)
return 0;
TRACE("(%p) wp %08lx, lp %08lx, vk %02x, scan %02x\n",
iface, wparam, lparam, hook->vkCode, hook->scanCode);
TRACE( "iface %p, wparam %#Ix, lparam %#Ix, vkCode %#lx, scanCode %#lx.\n", iface, wparam,
lparam, hook->vkCode, hook->scanCode );
switch (hook->vkCode)
{
@ -129,7 +129,7 @@ int dinput_keyboard_hook( IDirectInputDevice8W *iface, WPARAM wparam, LPARAM lpa
static DWORD get_keyboard_subtype(void)
{
DWORD kbd_type, kbd_subtype, dev_subtype;
INT kbd_type, kbd_subtype, dev_subtype;
kbd_type = GetKeyboardType(0);
kbd_subtype = GetKeyboardType(1);
@ -138,7 +138,7 @@ static DWORD get_keyboard_subtype(void)
else if (kbd_type == 7 && kbd_subtype == 2)
dev_subtype = DIDEVTYPEKEYBOARD_JAPAN106;
else {
FIXME("Unknown keyboard type=%u, subtype=%u\n", kbd_type, kbd_subtype);
FIXME( "Unknown keyboard type %d, subtype %d\n", kbd_type, kbd_subtype );
dev_subtype = DIDEVTYPEKEYBOARD_PCENH;
}
return dev_subtype;
@ -149,7 +149,7 @@ HRESULT keyboard_enum_device( DWORD type, DWORD flags, DIDEVICEINSTANCEW *instan
BYTE subtype = get_keyboard_subtype();
DWORD size;
TRACE( "type %#x, flags %#x, instance %p, version %#04x\n", type, flags, instance, version );
TRACE( "type %#lx, flags %#lx, instance %p, version %#lx.\n", type, flags, instance, version );
size = instance->dwSize;
memset( instance, 0, size );
@ -169,7 +169,7 @@ HRESULT keyboard_create_device( struct dinput *dinput, const GUID *guid, IDirect
struct keyboard *impl;
HRESULT hr;
TRACE( "dinput %p, guid %s, out %p\n", dinput, debugstr_guid( guid ), out );
TRACE( "dinput %p, guid %s, out %p.\n", dinput, debugstr_guid( guid ), out );
*out = NULL;
if (!IsEqualGUID( &GUID_SysKeyboard, guid )) return DIERR_DEVICENOTREG;

View File

@ -76,7 +76,7 @@ HRESULT mouse_enum_device( DWORD type, DWORD flags, DIDEVICEINSTANCEW *instance,
{
DWORD size;
TRACE( "type %#x, flags %#x, instance %p, version %#04x\n", type, flags, instance, version );
TRACE( "type %#lx, flags %#lx, instance %p, version %#lx\n", type, flags, instance, version );
size = instance->dwSize;
memset( instance, 0, size );
@ -157,7 +157,7 @@ void dinput_mouse_rawinput_hook( IDirectInputDevice8W *iface, WPARAM wparam, LPA
RI_MOUSE_BUTTON_5_DOWN, RI_MOUSE_BUTTON_5_UP
};
TRACE( "(%p) wp %08lx, lp %08lx\n", iface, wparam, lparam );
TRACE( "iface %p, wparam %#Ix, lparam %#Ix, ri %p.\n", iface, wparam, lparam, ri );
if (ri->data.mouse.usFlags & MOUSE_VIRTUAL_DESKTOP)
FIXME( "Unimplemented MOUSE_VIRTUAL_DESKTOP flag\n" );
@ -229,7 +229,7 @@ void dinput_mouse_rawinput_hook( IDirectInputDevice8W *iface, WPARAM wparam, LPA
}
}
TRACE( "buttons %02x %02x %02x %02x %02x, x %d, y %d, w %d\n", state->rgbButtons[0],
TRACE( "buttons %02x %02x %02x %02x %02x, x %+ld, y %+ld, w %+ld\n", state->rgbButtons[0],
state->rgbButtons[1], state->rgbButtons[2], state->rgbButtons[3], state->rgbButtons[4],
state->lX, state->lY, state->lZ );
@ -246,7 +246,7 @@ int dinput_mouse_hook( IDirectInputDevice8W *iface, WPARAM wparam, LPARAM lparam
int wdata = 0, inst_id = -1, ret = 0;
BOOL notify = FALSE;
TRACE("msg %lx @ (%d %d)\n", wparam, hook->pt.x, hook->pt.y);
TRACE( "iface %p, msg %#Ix, x %+ld, y %+ld\n", iface, wparam, hook->pt.x, hook->pt.y );
EnterCriticalSection( &impl->base.crit );
@ -339,7 +339,7 @@ int dinput_mouse_hook( IDirectInputDevice8W *iface, WPARAM wparam, LPARAM lparam
notify = TRUE;
}
TRACE( "buttons %02x %02x %02x %02x %02x, x %d, y %d, w %d\n", state->rgbButtons[0],
TRACE( "buttons %02x %02x %02x %02x %02x, x %+ld, y %+ld, w %+ld\n", state->rgbButtons[0],
state->rgbButtons[1], state->rgbButtons[2], state->rgbButtons[3], state->rgbButtons[4],
state->lX, state->lY, state->lZ );
@ -366,7 +366,7 @@ static void warp_check( struct mouse *impl, BOOL force )
{
mapped_center.x = (rect.left + rect.right) / 2;
mapped_center.y = (rect.top + rect.bottom) / 2;
TRACE("Warping mouse to %d - %d\n", mapped_center.x, mapped_center.y);
TRACE( "Warping mouse to x %+ld, y %+ld.\n", mapped_center.x, mapped_center.y );
SetCursorPos( mapped_center.x, mapped_center.y );
}
if (impl->base.dwCoopLevel & DISCL_EXCLUSIVE)

View File

@ -1,7 +1,7 @@
MODULE = dinput8.dll
IMPORTLIB = dinput8
IMPORTS = dinput8 dxguid uuid comctl32 ole32 user32 advapi32 hid setupapi
EXTRADEFS = -DWINE_NO_LONG_TYPES -DDIRECTINPUT_VERSION=0x0800
EXTRADEFS = -DDIRECTINPUT_VERSION=0x0800
PARENTSRC = ../dinput
C_SRCS = \