mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-11 15:22:16 +00:00
Fix freeze when timidity_exe is not set to timidity's absolute path
This commit is contained in:
parent
18e76c978c
commit
ff35620a09
1 changed files with 5 additions and 3 deletions
|
@ -532,13 +532,15 @@ bool TimidityPPMIDIDevice::LaunchTimidity ()
|
|||
do
|
||||
{
|
||||
spaceIdx = CommandLine.IndexOf(' ', spaceIdx);
|
||||
spaceInExePathCount += 1;
|
||||
TimidityExe = CommandLine.Left(spaceIdx);
|
||||
glob(TimidityExe.GetChars(), 0, NULL, &glb);
|
||||
} while (spaceIdx != -1 && glb.gl_pathc == 0);
|
||||
if (spaceIdx == -1)
|
||||
spaceIdx += 1;
|
||||
spaceInExePathCount += 1;
|
||||
} while (spaceIdx != 0 && glb.gl_pathc == 0);
|
||||
if (spaceIdx == 0)
|
||||
{
|
||||
TimidityExe = FString("timidity"); // Maybe it's in your PATH?
|
||||
spaceInExePathCount = 0;
|
||||
}
|
||||
globfree(&glb);
|
||||
|
||||
|
|
Loading…
Reference in a new issue