1
0
Fork 0

Accept directory in LIBBLURAY_CP

This commit is contained in:
hpi1 2015-02-22 17:16:40 +02:00
parent 6d324aa419
commit 26b48905e0
2 changed files with 14 additions and 4 deletions

View File

@ -2,6 +2,7 @@
- Add UDF volume identifier to DISC_INFO.
- Fix infinite loop with some broken HDMV menus.
- Emit BD_EVENT_PLAYLIST_STOP when playlist playback is stopped in middle.
- Accept directory name (without .jar file name) in LIBBLURAY_CP.
2015-01-26: Version 0.7.0
- Add player setting for BD-J persistent storage and cache paths.

View File

@ -220,14 +220,23 @@ static const char *_find_libbluray_jar(void)
FILE *fp;
unsigned i;
// check if overriding the classpath
if (!classpath) {
classpath = getenv("LIBBLURAY_CP");
}
if (classpath) {
return classpath;
}
// check if overriding the classpath
classpath = getenv("LIBBLURAY_CP");
if (classpath) {
size_t cp_len = strlen(classpath);
// directory or file ?
if (cp_len > 0 && (classpath[cp_len - 1] == '/' || classpath[cp_len - 1] == '\\')) {
classpath = str_printf("%s%s", classpath, BDJ_JARFILE);
}
return classpath;
}
BD_DEBUG(DBG_BDJ, "LIBBLURAY_CP not set, searching for "BDJ_JARFILE" ...\n");
// check directory where libbluray.so was loaded from