Skip to content

Commit 451e99f

Browse files
authored
Merge pull request #41 from sezero/pat
LoadPAT: timidity.cfg and instrument path tweaks
2 parents 1a0dadd + dc3c703 commit 451e99f

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

src/load_pat.cpp

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,14 @@
4646

4747
#include "load_pat.h"
4848

49-
#ifdef MSC_VER
49+
#ifdef _WIN32
5050
#define DIRDELIM '\\'
5151
#define TIMIDITYCFG "C:\\TIMIDITY\\TIMIDITY.CFG"
5252
#define PATHFORPAT "C:\\TIMIDITY\\INSTRUMENTS"
5353
#else
5454
#define DIRDELIM '/'
55-
#define TIMIDITYCFG "/usr/local/share/timidity/timidity.cfg"
56-
#define PATHFORPAT "/usr/local/share/timidity/instruments"
55+
#define TIMIDITYCFG "/etc/timidity.cfg" /*"/usr/share/timidity/timidity.cfg"*/
56+
#define PATHFORPAT "/usr/share/timidity/instruments"
5757
#endif
5858

5959
#define PAT_ENV_PATH2CFG "MMPAT_PATH_TO_CFG"
@@ -764,10 +764,7 @@ BOOL CSoundFile::TestPAT(const BYTE *lpStream, DWORD dwMemLength)
764764
// =====================================================================================
765765
static PATHANDLE *PAT_Init(void)
766766
{
767-
PATHANDLE *retval;
768-
retval = (PATHANDLE *)calloc(1,sizeof(PATHANDLE));
769-
if( !retval ) return NULL;
770-
return retval;
767+
return (PATHANDLE *)calloc(1,sizeof(PATHANDLE));
771768
}
772769

773770
// =====================================================================================

0 commit comments

Comments
 (0)