Change: [Win32] Parse and load DLS files for the DirectMusic driver without relying on high-level functions.

This commit is contained in:
Michael Lutz
2018-05-20 03:55:06 +02:00
parent 255549250f
commit ce51e54d26
2 changed files with 690 additions and 36 deletions

View File

@@ -149,4 +149,17 @@ static inline DIR *ttd_opendir(const char *path)
return opendir(OTTD2FS(path));
}
/** Auto-close a file upon scope exit. */
class FileCloser {
FILE *f;
public:
FileCloser(FILE *_f) : f(_f) {}
~FileCloser()
{
fclose(f);
}
};
#endif /* FILEIO_FUNC_H */