This commit is contained in:
Anthony Calosa
2024-11-18 11:23:00 +08:00
parent 9093c77e72
commit f48cf951db
2 changed files with 4 additions and 2 deletions

View File

@@ -96,6 +96,9 @@ public class Main {
@Override @Override
public void closeSplashScreen() { public void closeSplashScreen() {
// FIXME: on Linux system it can't close splashscreen image or crash with SIGSEGV? How come it works on other OS?
if (OperatingSystem.isUnix() || OperatingSystem.isSolaris())
return;
//could throw exception.. //could throw exception..
try { try {
Optional.ofNullable(SplashScreen.getSplashScreen()).ifPresent(SplashScreen::close); Optional.ofNullable(SplashScreen.getSplashScreen()).ifPresent(SplashScreen::close);

View File

@@ -159,6 +159,7 @@ public class Forge implements ApplicationListener {
public void create() { public void create() {
//install our error handler //install our error handler
ExceptionHandler.registerErrorHandling(); ExceptionHandler.registerErrorHandling();
getDeviceAdapter().closeSplashScreen();
GuiBase.setIsAndroid(Gdx.app.getType() == Application.ApplicationType.Android); GuiBase.setIsAndroid(Gdx.app.getType() == Application.ApplicationType.Android);
@@ -257,8 +258,6 @@ public class Forge implements ApplicationListener {
/* call preloadExtendedArt here, if we put it above we will * /* call preloadExtendedArt here, if we put it above we will *
* get error: No OpenGL context found in the current thread. */ * get error: No OpenGL context found in the current thread. */
preloadExtendedArt(); preloadExtendedArt();
// should be after create method but try to close this at a later time.
getDeviceAdapter().closeSplashScreen();
}); });
}; };
//see if app or assets need updating //see if app or assets need updating