SDL: Install vba-over.ini in the data directory and use it.
git-svn-id: https://svn.code.sf.net/p/vbam/code/trunk@1060 a31d4220-a93d-0410-bf67-fe4944624d44
This commit is contained in:
parent
58db70f758
commit
b716c9c328
|
@ -416,6 +416,7 @@ IF( ENABLE_SDL )
|
|||
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/sdl/vbam.cfg-example
|
||||
DESTINATION ${SYSCONFDIR}
|
||||
RENAME vbam.cfg)
|
||||
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/vba-over.ini DESTINATION ${DATA_INSTALL_DIR})
|
||||
ENDIF( ENABLE_SDL )
|
||||
|
||||
IF( ENABLE_GTK )
|
||||
|
|
|
@ -468,14 +468,7 @@ FILE *sdlFindFile(const char *name)
|
|||
if(f != NULL)
|
||||
return f;
|
||||
}
|
||||
#else // ! _WIN32
|
||||
fprintf(stdout, "Searching system config directory: %s\n", SYSCONFDIR);
|
||||
sprintf(path, "%s%c%s", SYSCONFDIR, FILE_SEP, name);
|
||||
f = fopen(path, "r");
|
||||
if(f != NULL)
|
||||
return f;
|
||||
#endif // ! _WIN32
|
||||
|
||||
|
||||
if(!strchr(arg0, '/') &&
|
||||
!strchr(arg0, '\\')) {
|
||||
char *path = getenv("PATH");
|
||||
|
@ -515,6 +508,20 @@ FILE *sdlFindFile(const char *name)
|
|||
return f;
|
||||
}
|
||||
}
|
||||
#else // ! _WIN32
|
||||
fprintf(stdout, "Searching data directory: %s\n", PKGDATADIR);
|
||||
sprintf(path, "%s%c%s", PKGDATADIR, FILE_SEP, name);
|
||||
f = fopen(path, "r");
|
||||
if(f != NULL)
|
||||
return f;
|
||||
|
||||
fprintf(stdout, "Searching system config directory: %s\n", SYSCONFDIR);
|
||||
sprintf(path, "%s%c%s", SYSCONFDIR, FILE_SEP, name);
|
||||
f = fopen(path, "r");
|
||||
if(f != NULL)
|
||||
return f;
|
||||
#endif // ! _WIN32
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue