v1.1.0: fixed natives loading issues with FreeBSD

This commit is contained in:
Evan Debenham 2021-10-16 14:34:00 -04:00
parent 4ee98f2578
commit 740127b89d

View File

@ -26,8 +26,10 @@ import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application;
import com.badlogic.gdx.backends.lwjgl3.Lwjgl3ApplicationConfiguration;
import com.badlogic.gdx.backends.lwjgl3.Lwjgl3FileHandle;
import com.badlogic.gdx.backends.lwjgl3.Lwjgl3NativesLoader;
import com.badlogic.gdx.backends.lwjgl3.Lwjgl3Preferences;
import com.badlogic.gdx.files.FileHandle;
import com.badlogic.gdx.utils.GdxNativesLoader;
import com.badlogic.gdx.utils.SharedLibraryLoader;
import com.shatteredpixel.shatteredpixeldungeon.SPDSettings;
import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon;
@ -51,6 +53,15 @@ public class DesktopLauncher {
if (!DesktopLaunchValidator.verifyValidJVMState(args)){
return;
}
//detection for FreeBSD (which is equivalent to linux for us)
//TODO might want to merge request this to libGDX
if (System.getProperty("os.name").contains("FreeBSD")) {
SharedLibraryLoader.isLinux = true;
//this overrides incorrect values set in SharedLibraryLoader's static initializer
SharedLibraryLoader.isIos = false;
SharedLibraryLoader.is64Bit = System.getProperty("os.arch").contains("64") || System.getProperty("os.arch").startsWith("armv8");
}
final String title;
if (DesktopLauncher.class.getPackage().getSpecificationTitle() == null){