From bc31b388d1403e77c2066a599af900402dad8aaa Mon Sep 17 00:00:00 2001 From: Roderick Colenbrander Date: Sat, 6 May 2006 20:15:15 +0200 Subject: [PATCH] dinput: Fix Initialize return value. --- dlls/dinput/dinput_main.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/dlls/dinput/dinput_main.c b/dlls/dinput/dinput_main.c index 928bfb29b10..75170d8d74f 100644 --- a/dlls/dinput/dinput_main.c +++ b/dlls/dinput/dinput_main.c @@ -368,7 +368,13 @@ static HRESULT WINAPI IDirectInputWImpl_CreateDevice(LPDIRECTINPUT7A iface, } 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,