mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-12-22 16:41:46 +03:00
[FIX] Possible problem with lwjgl
This commit is contained in:
parent
e72e4ebb92
commit
5c7f7eedec
1 changed files with 14 additions and 1 deletions
|
@ -14,6 +14,19 @@ public class ClientService {
|
||||||
public static URL[] baseURLs;
|
public static URL[] baseURLs;
|
||||||
|
|
||||||
public static String findLibrary(String name) {
|
public static String findLibrary(String name) {
|
||||||
return nativePath.concat(IOHelper.PLATFORM_SEPARATOR).concat(JVMHelper.NATIVE_PREFIX).concat(name).concat(JVMHelper.NATIVE_EXTENSION);
|
if(name == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
var needExt = !name.endsWith(JVMHelper.NATIVE_EXTENSION);
|
||||||
|
var needPrefix = !name.startsWith(JVMHelper.NATIVE_PREFIX);
|
||||||
|
if(needExt && needPrefix) {
|
||||||
|
return nativePath.concat(IOHelper.PLATFORM_SEPARATOR).concat(JVMHelper.NATIVE_PREFIX).concat(name).concat(JVMHelper.NATIVE_EXTENSION);
|
||||||
|
} else if(needExt) {
|
||||||
|
return nativePath.concat(IOHelper.PLATFORM_SEPARATOR).concat(name).concat(JVMHelper.NATIVE_EXTENSION);
|
||||||
|
} else if(needPrefix) {
|
||||||
|
return nativePath.concat(IOHelper.PLATFORM_SEPARATOR).concat(JVMHelper.NATIVE_PREFIX).concat(name);
|
||||||
|
} else {
|
||||||
|
return nativePath.concat(IOHelper.PLATFORM_SEPARATOR).concat(name);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue