mirror of
https://github.com/ZDoom/ZMusic.git
synced 2025-01-19 14:50:50 +00:00
- fixed FileSystemSoundFontReader fail to read gus patches.
The method open_file use read text flags to open a file and it fail to check the header of the gus patches, by setting the flag to read binary fix the issue.
This commit is contained in:
parent
f4cfb36f4a
commit
a3b79ca8f6
1 changed files with 4 additions and 4 deletions
|
@ -320,7 +320,7 @@ public:
|
|||
std::string fullname;
|
||||
if (!fn)
|
||||
{
|
||||
f = utf8_fopen(mBaseFile.c_str(), "rt");
|
||||
f = utf8_fopen(mBaseFile.c_str(), "rb");
|
||||
fullname = mBaseFile;
|
||||
}
|
||||
else
|
||||
|
@ -330,11 +330,11 @@ public:
|
|||
for(int i = (int)mPaths.size()-1; i>=0; i--)
|
||||
{
|
||||
fullname = mPaths[i] + fn;
|
||||
f = utf8_fopen(fullname.c_str(), "rt");
|
||||
break;
|
||||
f = utf8_fopen(fullname.c_str(), "rb");
|
||||
if (f) break;
|
||||
}
|
||||
}
|
||||
if (!f) f = fopen(fn, "rt");
|
||||
if (!f) f = fopen(fn, "rb");
|
||||
}
|
||||
if (!f) return nullptr;
|
||||
auto tf = new StdioFileReader;
|
||||
|
|
Loading…
Reference in a new issue