diff --git a/desktop/src/main/java/com/shatteredpixel/shatteredpixeldungeon/desktop/DesktopLauncher.java b/desktop/src/main/java/com/shatteredpixel/shatteredpixeldungeon/desktop/DesktopLauncher.java index 667ed6118..243402c75 100644 --- a/desktop/src/main/java/com/shatteredpixel/shatteredpixeldungeon/desktop/DesktopLauncher.java +++ b/desktop/src/main/java/com/shatteredpixel/shatteredpixeldungeon/desktop/DesktopLauncher.java @@ -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){