[PATCH] dmstyle: Return S_FALSE for IDirectMusicStyle8::GetMotif.

Michael Stefaniuc mstefani at winehq.org
Thu Sep 17 13:45:55 CDT 2020


Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>

On 9/17/20 11:04 AM, Myah Caron wrote:
> Wine-bug: https://bugs.winehq.org/show_bug.cgi?id=49850
> Signed-off-by: Myah Caron <qsniyg at protonmail.com>
> ---
> According to documentation, S_OK signals to the program that the motif was found and the segment was
> created (in ppSegment). Clearly this is not the case, so until a proper implementation for GetMotif
> is written, returning S_FALSE should be a better return value, as it signals that the motif was not
> found, and therefore ppSegment should not be used.
> 
> This fixes a crash in No One Lives Forever when starting the game.
> 
>  dlls/dmstyle/style.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/dlls/dmstyle/style.c b/dlls/dmstyle/style.c
> index 5a97dac079a..6eaedb1fbdc 100644
> --- a/dlls/dmstyle/style.c
> +++ b/dlls/dmstyle/style.c
> @@ -201,8 +201,8 @@ static HRESULT WINAPI IDirectMusicStyle8Impl_GetMotif(IDirectMusicStyle8 *iface,
>          IDirectMusicSegment **ppSegment)
>  {
>          IDirectMusicStyle8Impl *This = impl_from_IDirectMusicStyle8(iface);
> -	FIXME("(%p, %p, %p): stub\n", This, pwszName, ppSegment);
> -	return S_OK;
> +        FIXME("(%p, %s, %p): stub\n", This, debugstr_w(pwszName), ppSegment);
> +        return S_FALSE;
>  }
> 
>  static HRESULT WINAPI IDirectMusicStyle8Impl_GetDefaultChordMap(IDirectMusicStyle8 *iface,
> --
> 2.28.0
> 
> 
> 




More information about the wine-devel mailing list