fixed games are not loaded to mwc
* fixed games are not loaded to mwc * fixed processbuilder
This commit is contained in:
parent
b88c530ac2
commit
79cb1c2476
|
@ -20,7 +20,6 @@
|
||||||
<classpathentry kind="src" path="src/test/main"/>
|
<classpathentry kind="src" path="src/test/main"/>
|
||||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-9">
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-9">
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="module" value="true"/>
|
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
|
|
|
@ -1317,7 +1317,7 @@ public class MainWindowController {
|
||||||
}
|
}
|
||||||
|
|
||||||
//remove all games from gamesAnchorPane and add them afterwards
|
//remove all games from gamesAnchorPane and add them afterwards
|
||||||
void refreshUIData() {
|
public void refreshUIData() {
|
||||||
//remove all games form gamesAnchorPane
|
//remove all games form gamesAnchorPane
|
||||||
gamesAnchorPane.getChildren().removeAll(gamesAnchorPane.getChildren());
|
gamesAnchorPane.getChildren().removeAll(gamesAnchorPane.getChildren());
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,8 @@ public class playGame extends Thread{
|
||||||
@Override
|
@Override
|
||||||
public void run(){
|
public void run(){
|
||||||
String selectedGameTitleID = mainWindowController.getSelectedGameTitleID();
|
String selectedGameTitleID = mainWindowController.getSelectedGameTitleID();
|
||||||
// String executeComand;
|
String cemuBin = mainWindowController.getCemuPath() + "/Cemu.exe";
|
||||||
|
String gameExec = "\"" + mainWindowController.getGameExecutePath() + "\"";
|
||||||
long startTime;
|
long startTime;
|
||||||
long endTime;
|
long endTime;
|
||||||
int timePlayedNow;
|
int timePlayedNow;
|
||||||
|
@ -57,30 +58,20 @@ public class playGame extends Thread{
|
||||||
});
|
});
|
||||||
startTime = System.currentTimeMillis();
|
startTime = System.currentTimeMillis();
|
||||||
try{
|
try{
|
||||||
// executeComand = mainWindowController.getExecuteCommand() + " \"" + mainWindowController.getGameExecutePath() + "\"";
|
|
||||||
|
|
||||||
if(mainWindowController.isFullscreen()){
|
|
||||||
if(System.getProperty("os.name").equals("Linux")){
|
|
||||||
p = new ProcessBuilder("wine", mainWindowController.getCemuPath() + "/Cemu.exe", "-f",
|
|
||||||
"-g \"" + mainWindowController.getGameExecutePath() + "\"").start();
|
|
||||||
} else {
|
|
||||||
p = new ProcessBuilder(mainWindowController.getCemuPath() + "/Cemu.exe", "-f",
|
|
||||||
"-g \"" + mainWindowController.getGameExecutePath() + "\"").start();
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
if(System.getProperty("os.name").equals("Linux")){
|
|
||||||
p = new ProcessBuilder("wine", mainWindowController.getCemuPath() + "/Cemu.exe",
|
|
||||||
"-g \"" + mainWindowController.getGameExecutePath() + "\"").start();
|
|
||||||
} else {
|
|
||||||
p = new ProcessBuilder(mainWindowController.getCemuPath() + "/Cemu.exe",
|
|
||||||
"-g \"" + mainWindowController.getGameExecutePath() + "\"").start();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// LOGGER.info(p.toString());
|
|
||||||
|
|
||||||
// p = Runtime.getRuntime().exec(");
|
|
||||||
// p = new ProcessBuilder("wine", "/home/jannik/Downloads/cemu_1.11.3/Cemu.exe", "-g \"" + mainWindowController.getGameExecutePath() + "\"").start();
|
|
||||||
|
|
||||||
|
if (System.getProperty("os.name").equals("Linux")) {
|
||||||
|
if(mainWindowController.isFullscreen()){
|
||||||
|
p = new ProcessBuilder("wine", cemuBin, "-f", "-g", gameExec).start();
|
||||||
|
} else {
|
||||||
|
p = new ProcessBuilder("wine", cemuBin, "-g", gameExec).start();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if(mainWindowController.isFullscreen()){
|
||||||
|
p = new ProcessBuilder(cemuBin, "-f", "-g", gameExec).start();
|
||||||
|
} else {
|
||||||
|
p = new ProcessBuilder(cemuBin, "-g", gameExec).start();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
p.waitFor();
|
p.waitFor();
|
||||||
endTime = System.currentTimeMillis();
|
endTime = System.currentTimeMillis();
|
||||||
|
|
|
@ -150,6 +150,7 @@ public class DBController {
|
||||||
mainWindowController.reloadRoms();
|
mainWindowController.reloadRoms();
|
||||||
} else {
|
} else {
|
||||||
loadAllGames();
|
loadAllGames();
|
||||||
|
mainWindowController.refreshUIData();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue