[PATCH 0/1] MR4703: dmime: Fix handling of curve PMSG.
DMUS_PMSG::dwType is the type of the message, but we are comparing it to curve types. We should be using DMUS_CURVE_PMSG::bType instead. * * * (I tried to write some test cases for this. I created a IDirectMusicPort implementation that checks the generated midi commands, but instead I cannot get Windows to generate any midi commands for CCCURVEs. ) -- https://gitlab.winehq.org/wine/wine/-/merge_requests/4703
From: Yuxuan Shui <yshui(a)codeweavers.com> DMUS_PMSG::dwType is the type of the message, but we are comparing it to curve types. We should be using DMUS_CURVE_PMSG::bType instead. --- dlls/dmime/performance.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/dlls/dmime/performance.c b/dlls/dmime/performance.c index 1d1da250cc3..25878d16eaf 100644 --- a/dlls/dmime/performance.c +++ b/dlls/dmime/performance.c @@ -2087,7 +2087,7 @@ static HRESULT WINAPI performance_tool_ProcessPMsg(IDirectMusicTool *iface, DMUS_CURVE_PMSG *curve = (DMUS_CURVE_PMSG *)msg; msg->mtTime += curve->nOffset; - switch (curve->dwType) + switch (curve->bType) { case DMUS_CURVET_CCCURVE: if (FAILED(hr = performance_send_midi_pmsg(This, msg, DMUS_PMSGF_MUSICTIME | DMUS_PMSGF_TOOL_IMMEDIATE, @@ -2096,8 +2096,14 @@ static HRESULT WINAPI performance_tool_ProcessPMsg(IDirectMusicTool *iface, break; case DMUS_CURVET_RPNCURVE: case DMUS_CURVET_NRPNCURVE: + case DMUS_CURVET_MATCURVE: + case DMUS_CURVET_PATCURVE: + case DMUS_CURVET_PBCURVE: FIXME("Unhandled curve type %#lx\n", curve->dwType); break; + default: + WARN("Invalid curve type %#lx\n", curve->dwType); + break; } break; -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/4703
Thanks for spotting this, looks like an obvious typo from me. Adding @mstefani nonetheless as they're the module maintainer here. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/4703#note_56093
This merge request was approved by Rémi Bernon. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/4703
Rémi Bernon (@rbernon) commented about dlls/dmime/performance.c:
break; case DMUS_CURVET_RPNCURVE: case DMUS_CURVET_NRPNCURVE: + case DMUS_CURVET_MATCURVE: + case DMUS_CURVET_PATCURVE: + case DMUS_CURVET_PBCURVE: FIXME("Unhandled curve type %#lx\n", curve->dwType); break; + default: + WARN("Invalid curve type %#lx\n", curve->dwType); + break;
Actually we're still printing dwType here. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/4703#note_56095
On Fri Dec 15 16:32:04 2023 +0000, Rémi Bernon wrote:
Actually we're still printing dwType here. oops :sweat_smile:
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/4703#note_56109
participants (3)
-
Rémi Bernon -
Yuxuan Shui -
Yuxuan Shui (@yshui)