Module: wine Branch: master Commit: e9fdbe4d5524db1748bc4e7222ba41477aaa918e URL: https://gitlab.winehq.org/wine/wine/-/commit/e9fdbe4d5524db1748bc4e7222ba414...
Author: Rémi Bernon rbernon@codeweavers.com Date: Mon Oct 16 19:06:34 2023 +0200
dmband: Set DMUS_PATCH_PMSG bank LSB/MSB from instrument patch.
---
dlls/dmband/band.c | 8 ++++++++ 1 file changed, 8 insertions(+)
diff --git a/dlls/dmband/band.c b/dlls/dmband/band.c index 456bb20143e..4c593741516 100644 --- a/dlls/dmband/band.c +++ b/dlls/dmband/band.c @@ -496,6 +496,7 @@ HRESULT band_send_messages(IDirectMusicBand *iface, IDirectMusicPerformance *per
LIST_FOR_EACH_ENTRY_REV(entry, &This->instruments, struct instrument_entry, entry) { + DWORD patch = entry->instrument.dwPatch; DMUS_PATCH_PMSG *msg;
if (FAILED(hr = IDirectMusicPerformance_AllocPMsg(performance, sizeof(*msg), @@ -510,6 +511,13 @@ HRESULT band_send_messages(IDirectMusicBand *iface, IDirectMusicPerformance *per msg->dwGroupID = 1; msg->byInstrument = entry->instrument.dwPatch;
+ msg->byInstrument = patch & 0x7F; + patch >>= 8; + msg->byLSB = patch & 0x7f; + patch >>= 8; + msg->byMSB = patch & 0x7f; + patch >>= 8; + if (FAILED(hr = IDirectMusicGraph_StampPMsg(graph, (DMUS_PMSG *)msg)) || FAILED(hr = IDirectMusicPerformance_SendPMsg(performance, (DMUS_PMSG *)msg))) {