mirror of
https://github.com/badvision/jace.git
synced 2024-11-28 10:52:33 +00:00
Added extra warm-start to the initial boot to help resolve one-off situations where emulator starts in a stuck state
This commit is contained in:
parent
8c648c42bb
commit
194ba729dc
@ -3,7 +3,6 @@
|
|||||||
* To change this template file, choose Tools | Templates
|
* To change this template file, choose Tools | Templates
|
||||||
* and open the template in the editor.
|
* and open the template in the editor.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package jace;
|
package jace;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
@ -19,10 +18,11 @@ import javafx.stage.Stage;
|
|||||||
* @author blurry
|
* @author blurry
|
||||||
*/
|
*/
|
||||||
public class JaceApplication extends Application {
|
public class JaceApplication extends Application {
|
||||||
|
|
||||||
static JaceApplication singleton;
|
static JaceApplication singleton;
|
||||||
Stage primaryStage;
|
Stage primaryStage;
|
||||||
JaceUIController controller;
|
JaceUIController controller;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void start(Stage stage) throws Exception {
|
public void start(Stage stage) throws Exception {
|
||||||
singleton = this;
|
singleton = this;
|
||||||
@ -38,7 +38,7 @@ public class JaceApplication extends Application {
|
|||||||
} catch (IOException exception) {
|
} catch (IOException exception) {
|
||||||
throw new RuntimeException(exception);
|
throw new RuntimeException(exception);
|
||||||
}
|
}
|
||||||
|
|
||||||
primaryStage.show();
|
primaryStage.show();
|
||||||
Emulator emulator = new Emulator(getParameters().getRaw());
|
Emulator emulator = new Emulator(getParameters().getRaw());
|
||||||
javafx.application.Platform.runLater(() -> {
|
javafx.application.Platform.runLater(() -> {
|
||||||
@ -46,23 +46,24 @@ public class JaceApplication extends Application {
|
|||||||
Thread.yield();
|
Thread.yield();
|
||||||
}
|
}
|
||||||
controller.connectComputer(Emulator.computer);
|
controller.connectComputer(Emulator.computer);
|
||||||
|
Emulator.computer.warmStart();
|
||||||
});
|
});
|
||||||
primaryStage.setOnCloseRequest(event->{
|
primaryStage.setOnCloseRequest(event -> {
|
||||||
emulator.computer.deactivate();
|
Emulator.computer.deactivate();
|
||||||
Platform.exit();
|
Platform.exit();
|
||||||
System.exit(0);
|
System.exit(0);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public static JaceApplication getApplication() {
|
public static JaceApplication getApplication() {
|
||||||
return singleton;
|
return singleton;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param args the command line arguments
|
* @param args the command line arguments
|
||||||
*/
|
*/
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
launch(args);
|
launch(args);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user