Commit 879c4282 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

dmloader: Cleanup IDirectMusicLoaderImpl_SetSearchDirectory().

and emit a FIXME only if the clear flag is set. Signed-off-by: 's avatarMichael Stefaniuc <mstefani@winehq.org> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent ed6ee0f8
...@@ -513,18 +513,21 @@ static HRESULT WINAPI IDirectMusicLoaderImpl_SetObject(IDirectMusicLoader8 *ifac ...@@ -513,18 +513,21 @@ static HRESULT WINAPI IDirectMusicLoaderImpl_SetObject(IDirectMusicLoader8 *ifac
return S_OK; return S_OK;
} }
static HRESULT WINAPI IDirectMusicLoaderImpl_SetSearchDirectory(IDirectMusicLoader8 *iface, REFGUID rguidClass, WCHAR *pwzPath, BOOL fClear) static HRESULT WINAPI IDirectMusicLoaderImpl_SetSearchDirectory(IDirectMusicLoader8 *iface,
REFGUID class, WCHAR *path, BOOL clear)
{ {
IDirectMusicLoaderImpl *This = impl_from_IDirectMusicLoader8(iface); IDirectMusicLoaderImpl *This = impl_from_IDirectMusicLoader8(iface);
WCHAR wszCurrentPath[MAX_PATH]; WCHAR current_path[MAX_PATH];
TRACE("(%p, %s, %s, %d)\n", This, debugstr_dmguid(rguidClass), debugstr_w(pwzPath), fClear);
FIXME(": fClear ignored\n"); TRACE("(%p, %s, %s, %d)\n", This, debugstr_dmguid(class), debugstr_w(path), clear);
DMUSIC_GetLoaderSettings (iface, rguidClass, wszCurrentPath, NULL); if (clear)
if (!strncmpW(wszCurrentPath, pwzPath, MAX_PATH)) { FIXME("clear flag ignored\n");
DMUSIC_GetLoaderSettings(iface, class, current_path, NULL);
if (!strncmpW(current_path, path, MAX_PATH))
return S_FALSE; return S_FALSE;
}
/* FIXME: check if path is valid; else return DMUS_E_LOADER_BADPATH */ return DMUSIC_SetLoaderSettings(iface, class, path, NULL);
return DMUSIC_SetLoaderSettings (iface, rguidClass, pwzPath, NULL);
} }
static HRESULT WINAPI IDirectMusicLoaderImpl_ScanDirectory(IDirectMusicLoader8 *iface, REFGUID rguidClass, WCHAR *pwzFileExtension, WCHAR *pwzScanFileName) static HRESULT WINAPI IDirectMusicLoaderImpl_ScanDirectory(IDirectMusicLoader8 *iface, REFGUID rguidClass, WCHAR *pwzFileExtension, WCHAR *pwzScanFileName)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment