diff --git a/bin/application/MainWindowController.class b/bin/application/MainWindowController.class index 8a6ad33..597437a 100644 Binary files a/bin/application/MainWindowController.class and b/bin/application/MainWindowController.class differ diff --git a/bin/application/dbController.class b/bin/application/dbController.class index 966d505..7a6bf83 100644 Binary files a/bin/application/dbController.class and b/bin/application/dbController.class differ diff --git a/bin/application/playGame.class b/bin/application/playGame.class index 65c81c2..4e90556 100644 Binary files a/bin/application/playGame.class and b/bin/application/playGame.class differ diff --git a/src/application/MainWindowController.java b/src/application/MainWindowController.java index 3baa3f9..5b634c8 100644 --- a/src/application/MainWindowController.java +++ b/src/application/MainWindowController.java @@ -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(); } diff --git a/src/application/dbController.java b/src/application/dbController.java index c21f0fe..8316499 100644 --- a/src/application/dbController.java +++ b/src/application/dbController.java @@ -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"); } } diff --git a/src/application/playGame.java b/src/application/playGame.java index 105f4a0..70ee9b9 100644 --- a/src/application/playGame.java +++ b/src/application/playGame.java @@ -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));