From 1056c881e12a6b88100118eee4b22725c6394791 Mon Sep 17 00:00:00 2001 From: Vitaliy Margolen Date: Sat, 9 Dec 2006 23:56:58 -0700 Subject: [PATCH] dinput: Fix processing of custom format. --- dlls/dinput/device.c | 7 +++++-- dlls/dinput/joystick_linux.c | 2 -- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/dlls/dinput/device.c b/dlls/dinput/device.c index 7d24dfce923..fd38baa3c10 100644 --- a/dlls/dinput/device.c +++ b/dlls/dinput/device.c @@ -327,8 +327,8 @@ DataFormat *create_DataFormat(const DIDATAFORMAT *wine_format, LPCDIDATAFORMAT a (DIDFT_GETINSTANCE(asked_format->rgodf[j].dwType) == DIDFT_GETINSTANCE(wine_format->rgodf[i].dwType))) && ( /* Then if the asked type matches the one Wine provides */ - wine_format->rgodf[i].dwType & asked_format->rgodf[j].dwType)) { - + DIDFT_GETTYPE(asked_format->rgodf[j].dwType) & wine_format->rgodf[i].dwType)) + { done[j] = 1; TRACE("Matching :\n"); @@ -1009,6 +1009,9 @@ HRESULT WINAPI IDirectInputDevice2AImpl_Escape( HRESULT WINAPI IDirectInputDevice2AImpl_Poll( LPDIRECTINPUTDEVICE8A iface) { + IDirectInputDevice2AImpl *This = (IDirectInputDevice2AImpl *)iface; + + if (!This->acquired) return DIERR_NOTACQUIRED; /* Because wine devices do not need to be polled, just return DI_NOEFFECT */ return DI_NOEFFECT; } diff --git a/dlls/dinput/joystick_linux.c b/dlls/dinput/joystick_linux.c index 7f9acd43bf9..474678cc30c 100644 --- a/dlls/dinput/joystick_linux.c +++ b/dlls/dinput/joystick_linux.c @@ -113,7 +113,6 @@ struct JoystickImpl int axes; int buttons; POV povs[4]; - BOOL overflow; }; static GUID DInput_Wine_Joystick_GUID = { /* 9e573ed9-7734-11d2-8d4a-23903fb6bdf7 */ @@ -495,7 +494,6 @@ static HRESULT alloc_device(REFGUID rguid, const void *jvt, IDirectInputImpl *di newDevice->base.lpVtbl = jvt; newDevice->base.ref = 1; newDevice->dinput = dinput; - newDevice->overflow = FALSE; CopyMemory(&newDevice->base.guid, rguid, sizeof(*rguid)); InitializeCriticalSection(&newDevice->base.crit); newDevice->base.crit.DebugInfo->Spare[0] = (DWORD_PTR)"DINPUT_joystick"; -- 2.11.4.GIT