[PATCH] dmstyle: The Chord track doesn't support the BandParam type
Michael Stefaniuc
mstefani at winehq.org
Tue Nov 19 14:02:51 CST 2019
Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
---
dlls/dmstyle/chordtrack.c | 25 +++++++++++--------------
dlls/dmstyle/tests/dmstyle.c | 9 ++++-----
2 files changed, 15 insertions(+), 19 deletions(-)
diff --git a/dlls/dmstyle/chordtrack.c b/dlls/dmstyle/chordtrack.c
index cb690b04dc..09d0bf3c9f 100644
--- a/dlls/dmstyle/chordtrack.c
+++ b/dlls/dmstyle/chordtrack.c
@@ -140,23 +140,20 @@ static HRESULT WINAPI chord_track_SetParam(IDirectMusicTrack8 *iface, REFGUID rg
return S_OK;
}
-static HRESULT WINAPI chord_track_IsParamSupported(IDirectMusicTrack8 *iface, REFGUID rguidType)
+static HRESULT WINAPI chord_track_IsParamSupported(IDirectMusicTrack8 *iface, REFGUID type)
{
- IDirectMusicChordTrack *This = impl_from_IDirectMusicTrack8(iface);
-
- TRACE("(%p, %s)\n", This, debugstr_dmguid(rguidType));
+ IDirectMusicChordTrack *This = impl_from_IDirectMusicTrack8(iface);
- if (!rguidType)
- return E_POINTER;
+ TRACE("(%p, %s)\n", This, debugstr_dmguid(type));
- if (IsEqualGUID (rguidType, &GUID_BandParam)
- || IsEqualGUID (rguidType, &GUID_ChordParam)
- || IsEqualGUID (rguidType, &GUID_RhythmParam)) {
- TRACE("param supported\n");
- return S_OK;
- }
- TRACE("param unsupported\n");
- return DMUS_E_TYPE_UNSUPPORTED;
+ if (!type)
+ return E_POINTER;
+
+ if (IsEqualGUID(type, &GUID_ChordParam) || IsEqualGUID(type, &GUID_RhythmParam))
+ return S_OK;
+
+ TRACE("param unsupported\n");
+ return DMUS_E_TYPE_UNSUPPORTED;
}
static HRESULT WINAPI chord_track_AddNotificationType(IDirectMusicTrack8 *iface,
diff --git a/dlls/dmstyle/tests/dmstyle.c b/dlls/dmstyle/tests/dmstyle.c
index 0c17ef3b41..6419f6f810 100644
--- a/dlls/dmstyle/tests/dmstyle.c
+++ b/dlls/dmstyle/tests/dmstyle.c
@@ -291,7 +291,7 @@ static void test_track(void)
unsigned int todo_params;
} class[] = {
{ X(DirectMusicAuditionTrack), TRUE, FALSE, 0x18204200, 0x18204200 },
- { X(DirectMusicChordTrack), TRUE, TRUE, 0x100002, 1 },
+ { X(DirectMusicChordTrack), TRUE, TRUE, 0x100002, 0 },
{ X(DirectMusicCommandTrack), TRUE, TRUE, 0x38, 0 },
{ X(DirectMusicMotifTrack), FALSE, FALSE, 0x8204200, 0 },
{ X(DirectMusicMuteTrack), TRUE, FALSE, 0x40000, 0 },
@@ -333,10 +333,9 @@ static void test_track(void)
ok(hr == S_OK, "IsParamSupported(%s) failed: %08x, expected S_OK\n",
param_types[j].name, hr);
else
- todo_wine_if(class[i].todo_params & (1 << j))
- ok(hr == DMUS_E_TYPE_UNSUPPORTED,
- "IsParamSupported(%s) failed: %08x, expected DMUS_E_TYPE_UNSUPPORTED\n",
- param_types[j].name, hr);
+ ok(hr == DMUS_E_TYPE_UNSUPPORTED,
+ "IsParamSupported(%s) failed: %08x, expected DMUS_E_TYPE_UNSUPPORTED\n",
+ param_types[j].name, hr);
}
if (class[i].clsid == &CLSID_DirectMusicMuteTrack) {
--
2.20.1
More information about the wine-devel
mailing list