mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 18:58:00 +00:00
update splash closing
This commit is contained in:
@@ -17,6 +17,7 @@ import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Optional;
|
||||
|
||||
public class Main {
|
||||
private static final String versionString = BuildInfo.getVersionString();
|
||||
@@ -79,9 +80,11 @@ public class Main {
|
||||
|
||||
@Override
|
||||
public void closeSplashScreen() {
|
||||
SplashScreen splash = SplashScreen.getSplashScreen();
|
||||
if (splash != null) {
|
||||
splash.close();
|
||||
//could throw exception..
|
||||
try {
|
||||
Optional.ofNullable(SplashScreen.getSplashScreen()).ifPresent(SplashScreen::close);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -159,7 +159,7 @@ public class Forge implements ApplicationListener {
|
||||
public void create() {
|
||||
//install our error handler
|
||||
ExceptionHandler.registerErrorHandling();
|
||||
getDeviceAdapter().closeSplashScreen();
|
||||
FThreads.invokeInEdtLater(() -> getDeviceAdapter().closeSplashScreen());
|
||||
|
||||
GuiBase.setIsAndroid(Gdx.app.getType() == Application.ApplicationType.Android);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user