mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-11 07:12:02 +00:00
- Also check for CT2MGM.SF2 if CT4MGM.SF2 is not found.
SVN r2556 (trunk)
This commit is contained in:
parent
2c397b1aac
commit
2136ef2aba
1 changed files with 10 additions and 4 deletions
|
@ -153,11 +153,16 @@ FluidSynthMIDIDevice::FluidSynthMIDIDevice()
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
// On Windows, look for the 4 megabyte patch set installed by Creative's drivers as a default.
|
// On Windows, look for the 4 megabyte patch set installed by Creative's drivers as a default.
|
||||||
char sysdir[MAX_PATH+sizeof("\\CT4MGM.SF2")];
|
char sysdir[MAX_PATH+sizeof("\\CT4MGM.SF2")];
|
||||||
if (0 != GetSystemDirectoryA(sysdir, MAX_PATH))
|
UINT filepart;
|
||||||
|
if (0 != (filepart = GetSystemDirectoryA(sysdir, MAX_PATH)))
|
||||||
{
|
{
|
||||||
strcat(sysdir, "\\CT4MGM.SF2");
|
strcat(sysdir, "\\CT4MGM.SF2");
|
||||||
if (0 == LoadPatchSets(sysdir))
|
if (0 == LoadPatchSets(sysdir))
|
||||||
{
|
{
|
||||||
|
// Try again with CT2MGM.SF2
|
||||||
|
sysdir[filepart + 3] = '2';
|
||||||
|
if (0 == LoadPatchSets(sysdir))
|
||||||
|
{
|
||||||
#endif
|
#endif
|
||||||
Printf("Failed to load any MIDI patches.\n");
|
Printf("Failed to load any MIDI patches.\n");
|
||||||
delete_fluid_synth(FluidSynth);
|
delete_fluid_synth(FluidSynth);
|
||||||
|
@ -165,6 +170,7 @@ FluidSynthMIDIDevice::FluidSynthMIDIDevice()
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
#ifdef unix
|
#ifdef unix
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue