Commit 1ae1744c authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

dinput: Move HID joystick extra caps to struct dinput_device.

As object properties. Signed-off-by: 's avatarRémi Bernon <rbernon@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent dee684fb
......@@ -740,6 +740,7 @@ void dinput_device_destroy( IDirectInputDevice8W *iface )
TRACE( "iface %p.\n", iface );
free( This->object_properties );
free( This->data_queue );
/* Free data format */
......@@ -1940,6 +1941,7 @@ HRESULT dinput_device_init( IDirectInputDevice8W *iface )
size = format->dwNumObjs * sizeof(*format->rgodf);
if (!(format->rgodf = calloc( 1, size ))) return DIERR_OUTOFMEMORY;
format->dwSize = sizeof(*format);
format->dwObjSize = sizeof(*format->rgodf);
format->dwFlags = DIDF_ABSAXIS;
......
......@@ -57,6 +57,17 @@ struct dinput_device_vtbl
#define DEVICE_STATE_MAX_SIZE 1024
struct object_properties
{
LONG bit_size;
LONG logical_min;
LONG logical_max;
LONG range_min;
LONG range_max;
LONG deadzone;
LONG saturation;
};
/* Device implementation */
struct dinput_device
{
......@@ -100,6 +111,7 @@ struct dinput_device
BOOL autocenter;
LONG device_gain;
struct object_properties *object_properties;
};
extern HRESULT dinput_device_alloc( SIZE_T size, const struct dinput_device_vtbl *vtbl, const GUID *guid,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment