Browse Source

removed last unnecessary reboot

* needs more testing, especialy under Windows
* test on a completly fresh setup
pull/18/head
Jannik 4 years ago
parent
commit
b915cf7ad9
  1. 2
      src/main/java/com/cemu_UI/application/Main.java
  2. 7
      src/main/java/com/cemu_UI/application/MainWindowController.java
  3. 2
      src/main/java/com/cemu_UI/controller/UpdateController.java

2
src/main/java/com/cemu_UI/application/Main.java

@ -142,8 +142,6 @@ public class Main extends Application {
mainWindowController.setLastLocalSync(0);
mainWindowController.setxPosHelper(0);
mainWindowController.saveSettings();
Runtime.getRuntime().exec("java -jar cemu_UI.jar"); //TODO check if this really is needed start again (preventing Bugs)
System.exit(0); //finishes itself
}
if (!pictureCache.exists()) {

7
src/main/java/com/cemu_UI/application/MainWindowController.java

@ -290,7 +290,7 @@ public class MainWindowController {
private String selectedGameTitle;
private String id;
private String version = "0.3.0";
private String buildNumber = "075";
private String buildNumber = "077";
private String versionName = "Puzzle Plank Galaxy";
private int xPos = -200;
private int yPos = 17;
@ -719,7 +719,7 @@ public class MainWindowController {
try {
Desktop.getDesktop().browse(new URI("https://github.com/Seil0/cemu_UI/issues/3"));
} catch (IOException | URISyntaxException e) {
e.printStackTrace();
LOGGER.error("An error ocoured while trying to open a Website.", e);
}
}
});
@ -1297,7 +1297,6 @@ public class MainWindowController {
//remove all games from gamesAnchorPane and add them afterwards
public void refreshUIData() {
System.out.println("refresh");
//remove all games form gamesAnchorPane
gamesAnchorPane.getChildren().removeAll(gamesAnchorPane.getChildren());
@ -1544,6 +1543,8 @@ public class MainWindowController {
/**FIXME somehow the window width is set to 8, if we can find a way to get always the real window with
*(at the beginning we have to use prefWidth after resizing Width) we can remove this
*This is caused by the time the game objects are generates,
*it's before the window is opened so it's size is > 10
*/
if (mainAnchorPane.getWidth() < 10) {
xPosHelperMax = (int) Math.floor((mainAnchorPane.getPrefWidth() - 36) / 217);

2
src/main/java/com/cemu_UI/controller/UpdateController.java

@ -149,7 +149,7 @@ public class UpdateController implements Runnable {
FileUtils.copyInputStreamToFile(pmis, new File("cemu_UI_update.jar")); // download update
org.apache.commons.io.FileUtils.copyFile(new File("cemu_UI_update.jar"), new File("cemu_UI.jar"));
org.apache.commons.io.FileUtils.deleteQuietly(new File("cemu_UI_update.jar")); // delete update
Runtime.getRuntime().exec("java -jar cemu_UI.jar"); // start again
Runtime.getRuntime().exec("java -jar cemu_UI.jar"); // start again TODO consider ProcessBuilder to execute
System.exit(0); // finishes itself
} catch (IOException e) {
Platform.runLater(() -> {

Loading…
Cancel
Save

Du besuchst diese Seite mit einem veralteten IPv4-Internetzugang. Möglicherweise treten in Zukunft Probleme mit der Erreichbarkeit und Performance auf. Bitte frage deinen Internetanbieter oder Netzwerkadministrator nach IPv6-Unterstützung.
You are visiting this site with an outdated IPv4 internet access. You may experience problems with accessibility and performance in the future. Please ask your ISP or network administrator for IPv6 support.
Weitere Infos | More Information
Klicke zum schließen | Click to close