linux support
This commit is contained in:
parent
2b0be67917
commit
ae95766fbd
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -148,8 +148,8 @@ public class MainWindowController {
|
|||
private String selectedGameTitleID;
|
||||
private String selectedGameTitle;
|
||||
private String color;
|
||||
private String version = "0.1.3";
|
||||
private String buildNumber = "002";
|
||||
private String version = "0.1.4";
|
||||
private String buildNumber = "007";
|
||||
@SuppressWarnings("unused")
|
||||
private String versionName = "";
|
||||
private int xPos = -200;
|
||||
|
@ -193,7 +193,7 @@ public class MainWindowController {
|
|||
romTextField.setText(romPath);
|
||||
colorPicker.setValue(Color.valueOf(getColor()));
|
||||
fullscreenToggleBtn.setSelected(isFullscreen());
|
||||
edit.setDisable(true);
|
||||
edit.setDisable(true);
|
||||
applyColor();
|
||||
}
|
||||
|
||||
|
|
|
@ -222,9 +222,14 @@ public class dbController {
|
|||
BufferedImage originalImage = ImageIO.read(new URL(rs.getString(6)));//change path to where file is located
|
||||
int type = originalImage.getType() == 0 ? BufferedImage.TYPE_INT_ARGB : originalImage.getType();
|
||||
BufferedImage resizeImagePNG = resizeImage(originalImage, type, 400, 600);
|
||||
ImageIO.write(resizeImagePNG, "png", new File(pictureCache+"\\"+rs.getString(3)+".png")); //change path where you want it saved
|
||||
coverPath = pictureCache+"\\"+rs.getString(3)+".png";
|
||||
|
||||
if(System.getProperty("os.name").equals("Linux")) {
|
||||
ImageIO.write(resizeImagePNG, "png", new File(pictureCache+"/"+rs.getString(3)+".png")); //change path where you want it saved
|
||||
coverPath = pictureCache+"/"+rs.getString(3)+".png";
|
||||
} else {
|
||||
ImageIO.write(resizeImagePNG, "png", new File(pictureCache+"\\"+rs.getString(3)+".png")); //change path where you want it saved
|
||||
coverPath = pictureCache+"\\"+rs.getString(3)+".png";
|
||||
}
|
||||
|
||||
addRom(rs.getString(2), coverPath, file.getCanonicalPath(), rs.getString(1), rs.getString(3), rs.getString(5),"","0");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,6 +16,7 @@ public class playGame extends Thread{
|
|||
|
||||
public void run(){
|
||||
String selectedGameTitleID = mainWindowController.getSelectedGameTitleID();
|
||||
String executeComand;
|
||||
long startTime;
|
||||
long endTime;
|
||||
int timePlayedNow;
|
||||
|
@ -28,11 +29,21 @@ public class playGame extends Thread{
|
|||
startTime = System.currentTimeMillis();
|
||||
try{
|
||||
if(mainWindowController.isFullscreen()){
|
||||
p = Runtime.getRuntime().exec(mainWindowController.getCemuPath()+"\\Cemu.exe -f -g \""+mainWindowController.getGameExecutePath()+"\"");
|
||||
if(System.getProperty("os.name").equals("Linux")){
|
||||
executeComand = "wine "+mainWindowController.getCemuPath()+"/Cemu.exe -f -g \""+mainWindowController.getGameExecutePath()+"\"";
|
||||
} else {
|
||||
executeComand = mainWindowController.getCemuPath()+"\\Cemu.exe -f -g \""+mainWindowController.getGameExecutePath()+"\"";
|
||||
}
|
||||
}else{
|
||||
p = Runtime.getRuntime().exec(mainWindowController.getCemuPath()+"\\Cemu.exe -g \""+mainWindowController.getGameExecutePath()+"\"");
|
||||
if(System.getProperty("os.name").equals("Linux")){
|
||||
executeComand = "wine "+mainWindowController.getCemuPath()+"/Cemu.exe -g \""+mainWindowController.getGameExecutePath()+"\"";
|
||||
} else {
|
||||
executeComand = mainWindowController.getCemuPath()+"\\Cemu.exe -g \""+mainWindowController.getGameExecutePath()+"\"";
|
||||
}
|
||||
}
|
||||
System.out.println(executeComand);
|
||||
|
||||
p = Runtime.getRuntime().exec(executeComand);
|
||||
p.waitFor();
|
||||
endTime = System.currentTimeMillis();
|
||||
timePlayedNow = (int) Math.floor(((endTime - startTime)/1000/60));
|
||||
|
|
Loading…
Reference in New Issue