SDL: Install vba-over.ini in the data directory and use it.
This commit is contained in:
parent
4817403abf
commit
9ca7db29f5
|
@ -416,6 +416,7 @@ IF( ENABLE_SDL )
|
||||||
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/sdl/vbam.cfg-example
|
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/sdl/vbam.cfg-example
|
||||||
DESTINATION ${SYSCONFDIR}
|
DESTINATION ${SYSCONFDIR}
|
||||||
RENAME vbam.cfg)
|
RENAME vbam.cfg)
|
||||||
|
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/vba-over.ini DESTINATION ${DATA_INSTALL_DIR})
|
||||||
ENDIF( ENABLE_SDL )
|
ENDIF( ENABLE_SDL )
|
||||||
|
|
||||||
IF( ENABLE_GTK )
|
IF( ENABLE_GTK )
|
||||||
|
|
|
@ -468,14 +468,7 @@ FILE *sdlFindFile(const char *name)
|
||||||
if(f != NULL)
|
if(f != NULL)
|
||||||
return f;
|
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, '/') &&
|
if(!strchr(arg0, '/') &&
|
||||||
!strchr(arg0, '\\')) {
|
!strchr(arg0, '\\')) {
|
||||||
char *path = getenv("PATH");
|
char *path = getenv("PATH");
|
||||||
|
@ -515,6 +508,20 @@ FILE *sdlFindFile(const char *name)
|
||||||
return f;
|
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;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue