shithub: choc

Download patch

ref: d34a98b434ccccf5bedbd799ec003551f34707d8
parent: 29c5ba092bb123e3ae0116a1586b1f583160a2a3
author: Roman Fomin <rfomin@gmail.com>
date: Sat Dec 17 09:19:42 EST 2022

win midi: Fix MS GS Wavetable Synth detection in Windows XP (#1561)


--- a/src/i_winmusic.c
+++ b/src/i_winmusic.c
@@ -1188,11 +1188,12 @@
     }
 
     // Is this device MS GS Synth?
-    if (mcaps.wMid == MM_MICROSOFT &&
-        mcaps.wPid == MM_MSFT_GENERIC_MIDISYNTH &&
-        mcaps.wTechnology == MOD_SWSYNTH)
     {
-        ms_gs_synth = MidiDevice;
+        const char pname[] = "Microsoft GS Wavetable";
+        if (!strncasecmp(pname, mcaps.szPname, sizeof(pname) - 1))
+        {
+            ms_gs_synth = MidiDevice;
+        }
     }
 
     mmr = midiStreamOpen(&hMidiStream, &MidiDevice, (DWORD)1,