mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-15 10:25:06 -04:00
boot crash: wait for javafx toolkit 10 times
Now the crash screen should be properly visible on early boot crashes
This commit is contained in:
parent
f4552eb644
commit
5b6fb3bf51
@ -147,7 +147,19 @@ class ErosCrashReport : JavaFXWindowController() {
|
||||
}
|
||||
}
|
||||
|
||||
JavaFXInitializer.await()
|
||||
for (i in 0 until 10) {
|
||||
try {
|
||||
JavaFXInitializer.await()
|
||||
} catch (error: InterruptedException) {
|
||||
continue
|
||||
}
|
||||
break
|
||||
}
|
||||
if (!JavaFXInitializer.initialized) {
|
||||
Log.log(LogMessageType.JAVAFX, LogLevels.FATAL) { "JavaFX Toolkit still not initialized, can't wait longer. Exit!" }
|
||||
ShutdownManager.shutdown(reason = AbstractShutdownReason.CRASH)
|
||||
return
|
||||
}
|
||||
|
||||
JavaFXUtil.runLater {
|
||||
val fxmlLoader = FXMLLoader(ErosCrashReport::class.java.getResource("/assets/minosoft/eros/crash/crash_screen.fxml"))
|
||||
|
Loading…
x
Reference in New Issue
Block a user