- snd_midipatchset and fluid_patchset are now processed through NicePath() for variable
substitution. In addition, on Windows, if they contain no path separator, they will automatically have $PROGDIR prepended to them. SVN r3781 (trunk)
This commit is contained in:
parent
37dffe210f
commit
12ef53a2ff
2 changed files with 31 additions and 2 deletions
|
|
@ -42,6 +42,7 @@
|
|||
#include "m_swap.h"
|
||||
#include "w_wad.h"
|
||||
#include "v_text.h"
|
||||
#include "cmdlib.h"
|
||||
|
||||
// MACROS ------------------------------------------------------------------
|
||||
|
||||
|
|
@ -471,7 +472,21 @@ int FluidSynthMIDIDevice::LoadPatchSets(const char *patches)
|
|||
count = 0;
|
||||
while (tok != NULL)
|
||||
{
|
||||
if (FLUID_FAILED != fluid_synth_sfload(FluidSynth, tok, count == 0))
|
||||
FString path;
|
||||
#ifdef _WIN32
|
||||
// If the path does not contain any path separators, automatically
|
||||
// prepend $PROGDIR to the path.
|
||||
if (strcspn(tok, ":/\\") == strlen(tok))
|
||||
{
|
||||
path << "$PROGDIR/" << tok;
|
||||
path = NicePath(path);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
path = NicePath(tok);
|
||||
}
|
||||
if (FLUID_FAILED != fluid_synth_sfload(FluidSynth, path, count == 0))
|
||||
{
|
||||
DPrintf("Loaded patch set %s.\n", tok);
|
||||
count++;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue