diff --git a/dlls/dinput/device.c b/dlls/dinput/device.c index 77c0c24b86d..5d8c9549c27 100644 --- a/dlls/dinput/device.c +++ b/dlls/dinput/device.c @@ -124,14 +124,14 @@ void _dump_DIPROPHEADER(LPCDIPROPHEADER diph) { } } -void _dump_OBJECTINSTANCEA(DIDEVICEOBJECTINSTANCEA *ddoi) { +void _dump_OBJECTINSTANCEA(const DIDEVICEOBJECTINSTANCEA *ddoi) { if (TRACE_ON(dinput)) { 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) { +void _dump_OBJECTINSTANCEW(const DIDEVICEOBJECTINSTANCEW *ddoi) { if (TRACE_ON(dinput)) { 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)); @@ -217,7 +217,7 @@ void _dump_DIDATAFORMAT(const DIDATAFORMAT *df) { } /* Conversion between internal data buffer and external data buffer */ -void fill_DataFormat(void *out, const void *in, DataFormat *df) { +void fill_DataFormat(void *out, const void *in, const DataFormat *df) { int i; const char *in_c = in; char *out_c = (char *) out; @@ -436,7 +436,7 @@ failed: } /* find an object by it's offset in a data format */ -static int offset_to_object(DataFormat *df, int offset) +static int offset_to_object(const DataFormat *df, int offset) { int i; @@ -460,14 +460,14 @@ static int id_to_object(LPCDIDATAFORMAT df, int id) return -1; } -int id_to_offset(DataFormat *df, int id) +int id_to_offset(const DataFormat *df, int id) { int obj = id_to_object(df->wine_df, id); return obj >= 0 && df->offsets ? df->offsets[obj] : -1; } -int find_property(DataFormat *df, LPCDIPROPHEADER ph) +int find_property(const DataFormat *df, LPCDIPROPHEADER ph) { switch (ph->dwHow) { diff --git a/dlls/dinput/device_private.h b/dlls/dinput/device_private.h index f62ad5c9887..4af99cc6645 100644 --- a/dlls/dinput/device_private.h +++ b/dlls/dinput/device_private.h @@ -68,13 +68,13 @@ struct IDirectInputDevice2AImpl }; /* Routines to do DataFormat / WineFormat conversions */ -extern void fill_DataFormat(void *out, const void *in, DataFormat *df) ; +extern void fill_DataFormat(void *out, const void *in, const DataFormat *df) ; extern HRESULT create_DataFormat(LPCDIDATAFORMAT asked_format, DataFormat *format); extern void release_DataFormat(DataFormat *df) ; extern void queue_event(LPDIRECTINPUTDEVICE8A iface, int ofs, DWORD data, DWORD time, DWORD seq); /* Helper functions to work with data format */ -extern int id_to_offset(DataFormat *df, int id); -extern int find_property(DataFormat *df, LPCDIPROPHEADER ph); +extern int id_to_offset(const DataFormat *df, int id); +extern int find_property(const DataFormat *df, LPCDIPROPHEADER ph); /** * Callback Data used by specific callback @@ -92,8 +92,8 @@ extern BOOL DIEnumDevicesCallbackAtoW(LPCDIDEVICEOBJECTINSTANCEA, LPVOID); extern void _dump_cooperativelevel_DI(DWORD dwFlags) ; extern void _dump_EnumObjects_flags(DWORD dwFlags) ; extern void _dump_DIPROPHEADER(LPCDIPROPHEADER diph) ; -extern void _dump_OBJECTINSTANCEA(DIDEVICEOBJECTINSTANCEA *ddoi) ; -extern void _dump_OBJECTINSTANCEW(DIDEVICEOBJECTINSTANCEW *ddoi) ; +extern void _dump_OBJECTINSTANCEA(const DIDEVICEOBJECTINSTANCEA *ddoi) ; +extern void _dump_OBJECTINSTANCEW(const DIDEVICEOBJECTINSTANCEW *ddoi) ; extern void _dump_DIDATAFORMAT(const DIDATAFORMAT *df) ; extern const char *_dump_dinput_GUID(const GUID *guid) ; diff --git a/dlls/dinput/effect_linuxinput.c b/dlls/dinput/effect_linuxinput.c index e9f5604333d..f5851fc678c 100644 --- a/dlls/dinput/effect_linuxinput.c +++ b/dlls/dinput/effect_linuxinput.c @@ -118,7 +118,7 @@ static void _dump_DIEFFECT_flags(DWORD dwFlags) } } -static void _dump_DIENVELOPE(LPDIENVELOPE env) +static void _dump_DIENVELOPE(LPCDIENVELOPE env) { if (env->dwSize != sizeof(DIENVELOPE)) { WARN("Non-standard DIENVELOPE structure size (%d instead of %d).\n", @@ -128,31 +128,31 @@ static void _dump_DIENVELOPE(LPDIENVELOPE env) env->dwAttackLevel, env->dwAttackTime, env->dwFadeLevel, env->dwFadeTime); } -static void _dump_DICONSTANTFORCE(LPDICONSTANTFORCE frc) +static void _dump_DICONSTANTFORCE(LPCDICONSTANTFORCE frc) { TRACE("Constant force has magnitude %d\n", frc->lMagnitude); } -static void _dump_DIPERIODIC(LPDIPERIODIC frc) +static void _dump_DIPERIODIC(LPCDIPERIODIC frc) { 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) +static void _dump_DIRAMPFORCE(LPCDIRAMPFORCE frc) { TRACE("Ramp force has start %d, end %d\n", frc->lStart, frc->lEnd); } -static void _dump_DICONDITION(LPDICONDITION frc) +static void _dump_DICONDITION(LPCDICONDITION frc) { 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); } -static void _dump_DICUSTOMFORCE(LPDICUSTOMFORCE frc) +static void _dump_DICUSTOMFORCE(LPCDICUSTOMFORCE frc) { unsigned int i; TRACE("Custom force uses %d channels, sample period %d. Has %d samples at %p.\n", diff --git a/dlls/dinput/joystick_linux.c b/dlls/dinput/joystick_linux.c index bc4ef5b5526..50a5f498567 100644 --- a/dlls/dinput/joystick_linux.c +++ b/dlls/dinput/joystick_linux.c @@ -120,7 +120,7 @@ static const GUID DInput_Wine_Joystick_GUID = { /* 9e573ed9-7734-11d2-8d4a-23903 {0x8d, 0x4a, 0x23, 0x90, 0x3f, 0xb6, 0xbd, 0xf7} }; -static void _dump_DIDEVCAPS(LPDIDEVCAPS lpDIDevCaps) +static void _dump_DIDEVCAPS(const DIDEVCAPS *lpDIDevCaps) { TRACE("dwSize: %d\n", lpDIDevCaps->dwSize); TRACE("dwFlags: %08x\n", lpDIDevCaps->dwFlags);