xactengine3_7: Return valid HRESULT from IXACT3Engine Initialize.

FAudio doesn't always return a valid HRESULT, ensure a valid code
is passed back to the application.

Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alistair Leslie-Hughes 2020-08-04 11:30:33 +10:00 committed by Alexandre Julliard
parent 18d7bc9859
commit 47a5de3438
1 changed files with 6 additions and 1 deletions
dlls/xactengine3_7

View File

@ -157,6 +157,7 @@ static HRESULT WINAPI IXACT3EngineImpl_Initialize(IXACT3Engine *iface,
{
XACT3EngineImpl *This = impl_from_IXACT3Engine(iface);
FACTRuntimeParameters params;
UINT ret;
TRACE("(%p)->(%p)\n", This, pParams);
@ -195,7 +196,11 @@ static HRESULT WINAPI IXACT3EngineImpl_Initialize(IXACT3Engine *iface,
params.fileIOCallbacks.readFileCallback = wrap_readfile;
params.fileIOCallbacks.getOverlappedResultCallback = wrap_getoverlappedresult;
return FACTAudioEngine_Initialize(This->fact_engine, &params);
ret = FACTAudioEngine_Initialize(This->fact_engine, &params);
if (ret != 0)
WARN("FACTAudioEngine_Initialize returned %d\n", ret);
return !ret ? S_OK : E_FAIL;
}
static HRESULT WINAPI IXACT3EngineImpl_ShutDown(IXACT3Engine *iface)