Vitaliy Margolen : dinput: Fix processing of custom format.
Alexandre Julliard
julliard at wine.codeweavers.com
Mon Dec 11 07:44:55 CST 2006
Module: wine
Branch: master
Commit: 1056c881e12a6b88100118eee4b22725c6394791
URL: http://source.winehq.org/git/wine.git/?a=commit;h=1056c881e12a6b88100118eee4b22725c6394791
Author: Vitaliy Margolen <wine-patches at kievinfo.com>
Date: Sat Dec 9 23:56:58 2006 -0700
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 7d24dfc..fd38baa 100644
--- a/dlls/dinput/device.c
+++ b/dlls/dinput/device.c
@@ -327,8 +327,8 @@ DataFormat *create_DataFormat(const DIDA
(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_
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 7f9acd4..474678c 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 rgui
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";
More information about the wine-cvs
mailing list