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.InputStream;
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
public class Main {
|
public class Main {
|
||||||
private static final String versionString = BuildInfo.getVersionString();
|
private static final String versionString = BuildInfo.getVersionString();
|
||||||
@@ -79,9 +80,11 @@ public class Main {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void closeSplashScreen() {
|
public void closeSplashScreen() {
|
||||||
SplashScreen splash = SplashScreen.getSplashScreen();
|
//could throw exception..
|
||||||
if (splash != null) {
|
try {
|
||||||
splash.close();
|
Optional.ofNullable(SplashScreen.getSplashScreen()).ifPresent(SplashScreen::close);
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -159,7 +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();
|
FThreads.invokeInEdtLater(() -> getDeviceAdapter().closeSplashScreen());
|
||||||
|
|
||||||
GuiBase.setIsAndroid(Gdx.app.getType() == Application.ApplicationType.Android);
|
GuiBase.setIsAndroid(Gdx.app.getType() == Application.ApplicationType.Android);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user