Module: wine Branch: refs/heads/master Commit: bc31b388d1403e77c2066a599af900402dad8aaa URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=bc31b388d1403e77c2066a59...
Author: Roderick Colenbrander thunderbird2k@gmx.net Date: Sat May 6 20:15:15 2006 +0200
dinput: Fix Initialize return value.
---
dlls/dinput/dinput_main.c | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/dlls/dinput/dinput_main.c b/dlls/dinput/dinput_main.c index 928bfb2..75170d8 100644 --- a/dlls/dinput/dinput_main.c +++ b/dlls/dinput/dinput_main.c @@ -368,7 +368,13 @@ static HRESULT WINAPI IDirectInputWImpl_ }
static HRESULT WINAPI IDirectInputAImpl_Initialize(LPDIRECTINPUT7A iface, HINSTANCE hinst, DWORD x) { - return DIERR_ALREADYINITIALIZED; + TRACE("(this=%p,%p,%lx)\n",iface, hinst, x); + + /* Initialize can return: DIERR_BETADIRECTINPUTVERSION, DIERR_OLDDIRECTINPUTVERSION and DI_OK. + * Since we already initialized the device, return DI_OK. In the past we returned DIERR_ALREADYINITIALIZED + * which broke applications like Tomb Raider Legend because it isn't a legal return value. + */ + return DI_OK; }
static HRESULT WINAPI IDirectInputAImpl_GetDeviceStatus(LPDIRECTINPUT7A iface,