Skip to content

Commit

Permalink
Damn, each Linux distrib put timidity.cfg at a different place
Browse files Browse the repository at this point in the history
  • Loading branch information
pmandin committed Jul 13, 2005
1 parent dc05630 commit e3d1f5d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions timidity/config.h
Expand Up @@ -219,6 +219,7 @@ typedef char int8;
then specify the library directory in the configuration file. */
#define CONFIG_FILE "timidity.cfg"
#define CONFIG_FILE_ETC "/etc/timidity.cfg"
#define CONFIG_FILE_ETC_TIMIDITY "/etc/timidity/timidity.cfg"

#ifdef __WIN32__
#define DEFAULT_PATH "\\TIMIDITY"
Expand Down
4 changes: 3 additions & 1 deletion timidity/timidity.c
Expand Up @@ -296,7 +296,9 @@ int Timidity_Init(int rate, int format, int channels, int samples)
{
if (read_config_file(CONFIG_FILE)<0) {
if (read_config_file(CONFIG_FILE_ETC)<0) {
return(-1);
if (read_config_file(CONFIG_FILE_ETC_TIMIDITY)<0) {
return(-1);
}
}
}

Expand Down

0 comments on commit e3d1f5d

Please sign in to comment.