diff --git a/bin/application/CloudController$1.class b/bin/application/CloudController$1.class index 6961e59..b7c69cc 100644 Binary files a/bin/application/CloudController$1.class and b/bin/application/CloudController$1.class differ diff --git a/bin/application/CloudController$2.class b/bin/application/CloudController$2.class index 01416ba..4862738 100644 Binary files a/bin/application/CloudController$2.class and b/bin/application/CloudController$2.class differ diff --git a/bin/application/CloudController$3.class b/bin/application/CloudController$3.class index 2132321..d0b0686 100644 Binary files a/bin/application/CloudController$3.class and b/bin/application/CloudController$3.class differ diff --git a/bin/application/CloudController.class b/bin/application/CloudController.class index 884bd0b..1121c7a 100644 Binary files a/bin/application/CloudController.class and b/bin/application/CloudController.class differ diff --git a/bin/application/Main.class b/bin/application/Main.class index c61144c..eaacc5c 100644 Binary files a/bin/application/Main.class and b/bin/application/Main.class differ diff --git a/bin/application/MainWindowController$1.class b/bin/application/MainWindowController$1.class index 0d34ffc..650d653 100644 Binary files a/bin/application/MainWindowController$1.class and b/bin/application/MainWindowController$1.class differ diff --git a/bin/application/MainWindowController$10.class b/bin/application/MainWindowController$10.class index 2f90ac0..19e4c25 100644 Binary files a/bin/application/MainWindowController$10.class and b/bin/application/MainWindowController$10.class differ diff --git a/bin/application/MainWindowController$11.class b/bin/application/MainWindowController$11.class index ffb01c2..01b571b 100644 Binary files a/bin/application/MainWindowController$11.class and b/bin/application/MainWindowController$11.class differ diff --git a/bin/application/MainWindowController$12.class b/bin/application/MainWindowController$12.class index 702260a..cc7b003 100644 Binary files a/bin/application/MainWindowController$12.class and b/bin/application/MainWindowController$12.class differ diff --git a/bin/application/MainWindowController$2.class b/bin/application/MainWindowController$2.class index 5d9fdc8..8eee081 100644 Binary files a/bin/application/MainWindowController$2.class and b/bin/application/MainWindowController$2.class differ diff --git a/bin/application/MainWindowController$3.class b/bin/application/MainWindowController$3.class index 5a1b882..ecc531c 100644 Binary files a/bin/application/MainWindowController$3.class and b/bin/application/MainWindowController$3.class differ diff --git a/bin/application/MainWindowController$4.class b/bin/application/MainWindowController$4.class index cc7c3c3..3d27cb5 100644 Binary files a/bin/application/MainWindowController$4.class and b/bin/application/MainWindowController$4.class differ diff --git a/bin/application/MainWindowController$5.class b/bin/application/MainWindowController$5.class index e4d7831..24e3ed6 100644 Binary files a/bin/application/MainWindowController$5.class and b/bin/application/MainWindowController$5.class differ diff --git a/bin/application/MainWindowController$6.class b/bin/application/MainWindowController$6.class index 44f5e34..ac200b5 100644 Binary files a/bin/application/MainWindowController$6.class and b/bin/application/MainWindowController$6.class differ diff --git a/bin/application/MainWindowController$7.class b/bin/application/MainWindowController$7.class index 5c179a1..9d192a7 100644 Binary files a/bin/application/MainWindowController$7.class and b/bin/application/MainWindowController$7.class differ diff --git a/bin/application/MainWindowController$8.class b/bin/application/MainWindowController$8.class index 0b2559a..a432aa6 100644 Binary files a/bin/application/MainWindowController$8.class and b/bin/application/MainWindowController$8.class differ diff --git a/bin/application/MainWindowController$9.class b/bin/application/MainWindowController$9.class index 6a6cb29..2956aba 100644 Binary files a/bin/application/MainWindowController$9.class and b/bin/application/MainWindowController$9.class differ diff --git a/bin/application/MainWindowController.class b/bin/application/MainWindowController.class index 83521de..767fc97 100644 Binary files a/bin/application/MainWindowController.class and b/bin/application/MainWindowController.class differ diff --git a/bin/application/SmmdbApiQuery.class b/bin/application/SmmdbApiQuery.class index e01f914..4610d27 100644 Binary files a/bin/application/SmmdbApiQuery.class and b/bin/application/SmmdbApiQuery.class differ diff --git a/bin/application/playGame.class b/bin/application/playGame.class index 90d6529..c6e8af5 100644 Binary files a/bin/application/playGame.class and b/bin/application/playGame.class differ diff --git a/src/application/CloudController.java b/src/application/CloudController.java index 069c45b..7f1d1a0 100644 --- a/src/application/CloudController.java +++ b/src/application/CloudController.java @@ -53,7 +53,8 @@ public class CloudController { main.mainWindowController.saveSettings(); Thread thread = new Thread(new Runnable() { - public void run() { + @Override + public void run() { Platform.runLater(() -> { main.mainWindowController.getPlayBtn().setText("syncing..."); }); @@ -82,6 +83,7 @@ public class CloudController { //running sync in a new thread, instead of blocking the main thread Thread thread = new Thread(new Runnable() { + @Override public void run() { Platform.runLater(() -> { main.mainWindowController.getPlayBtn().setText("syncing..."); @@ -113,7 +115,8 @@ public class CloudController { //running uploadFile in a new thread, instead of blocking the main thread new Thread() { - public void run() { + @Override + public void run() { System.out.println("starting uploadFile in new thread..."); if(cloudService.equals("GoogleDrive")) { diff --git a/src/application/Main.java b/src/application/Main.java index bf653a5..39dcbd0 100644 --- a/src/application/Main.java +++ b/src/application/Main.java @@ -91,7 +91,6 @@ public class Main extends Application { //check if client_secret.jason is present if (Main.class.getResourceAsStream("/resources/client_secret.json") == null) { LOGGER.error("client_secret is missing!!!!!"); -// System.err.println("client_secret is missing!!!!!"); Alert alert = new Alert(AlertType.ERROR); alert.setTitle("cemu_UI"); @@ -102,18 +101,14 @@ public class Main extends Application { LOGGER.info("Directory: " + directory.exists()); LOGGER.info("Configfile: " + configFile.exists()); -// System.out.println("Directory: " + directory.exists()); -// System.out.println("configfile: " + configFile.exists()); if(!directory.exists()){ LOGGER.info("creating cemu_UI directory"); -// System.out.println("mkdir all"); directory.mkdir(); pictureCache.mkdir(); } if(!configFile.exists()){ LOGGER.info("firststart, setting default values"); -// System.out.println("firststart"); firstStart(); mainWindowController.setColor("00a8cc"); mainWindowController.setxPosHelper(0); @@ -129,14 +124,12 @@ public class Main extends Application { if(gamesDBFile.exists() != true){ try { LOGGER.info("downloading games.db... "); -// System.out.print("downloading games.db... "); URL website = new URL(gamesDBdownloadURL); ReadableByteChannel rbc = Channels.newChannel(website.openStream()); FileOutputStream fos = new FileOutputStream(gamesDBFile); fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE); fos.close(); LOGGER.info("finished downloading games.db"); -// System.out.println("done!"); } catch (Exception e) { e.printStackTrace(); } diff --git a/src/application/MainWindowController.java b/src/application/MainWindowController.java index fc82318..64741bd 100644 --- a/src/application/MainWindowController.java +++ b/src/application/MainWindowController.java @@ -229,8 +229,8 @@ public class MainWindowController { private DirectoryChooser directoryChooser = new DirectoryChooser(); private File dirWin = new File(System.getProperty("user.home") + "/Documents/cemu_UI"); private File dirLinux = new File(System.getProperty("user.home") + "/cemu_UI"); - private File fileWin = new File(dirWin + "/config.xml"); - private File fileLinux = new File(dirLinux + "/config.xml"); + private File configFileWin = new File(dirWin + "/config.xml"); + private File configFileLinux = new File(dirLinux + "/config.xml"); File pictureCacheWin = new File(dirWin+"/picture_cache"); File pictureCacheLinux = new File(dirLinux+"/picture_cache"); private ObservableList smmIDs = FXCollections.observableArrayList("fe31b7f2", "44fc5929"); //TODO add more IDs @@ -301,7 +301,6 @@ public class MainWindowController { */ void initActions() { LOGGER.info("initializing Actions... "); -// System.out.println("initializing Actions... "); HamburgerBackArrowBasicTransition burgerTask = new HamburgerBackArrowBasicTransition(menuHam); menuHam.addEventHandler(MouseEvent.MOUSE_PRESSED, (e)->{ @@ -409,7 +408,7 @@ public class MainWindowController { String updatePath; System.out.println("update: "+selectedGameTitleID); if(selectedGameTitleID == null){ - System.out.println("trying to update null! null is not valid!"); + LOGGER.error("trying to update null! null is not valid!"); Alert alert = new Alert(AlertType.WARNING); alert.setTitle("edit"); alert.setHeaderText("cemu_UI"); @@ -433,21 +432,21 @@ public class MainWindowController { File srcDir = new File(updatePath); File destDir = new File(cemuPath+"\\mlc01\\usr\\title\\"+parts[0]+"\\"+parts[1]); - System.out.println(updatePath); - System.out.println(destDir.toString()); + LOGGER.info(updatePath); + LOGGER.info(destDir.toString()); if(destDir.exists() != true){ destDir.mkdir(); } try { - System.out.println("copying files..."); + LOGGER.info("copying files..."); playBtn.setText("updating..."); playBtn.setDisable(true); FileUtils.copyDirectory(srcDir, destDir); //TODO progress indicator playBtn.setText("play"); playBtn.setDisable(false); - System.out.println("done!"); + LOGGER.info("copying files done!"); } catch (IOException e) { e.printStackTrace(); } @@ -464,7 +463,7 @@ public class MainWindowController { String titleID = selectedGameTitleID; String dlcPath; - System.out.println("add DLC: "+selectedGameTitleID); + LOGGER.info("add DLC: "+selectedGameTitleID); if(selectedGameTitleID == null){ System.out.println("trying to add a dlc to null! null is not valid!"); Alert alert = new Alert(AlertType.WARNING); @@ -490,21 +489,21 @@ public class MainWindowController { File srcDir = new File(dlcPath); File destDir = new File(cemuPath+"\\mlc01\\usr\\title\\"+parts[0]+"\\"+parts[1]+"\\aoc"); - System.out.println(dlcPath); - System.out.println(destDir.toString()); + LOGGER.info(dlcPath); + LOGGER.info(destDir.toString()); if(destDir.exists() != true){ destDir.mkdir(); } try { - System.out.println("copying files..."); + LOGGER.info("copying files..."); playBtn.setText("copying files..."); playBtn.setDisable(true); FileUtils.copyDirectory(srcDir, destDir); //TODO progress indicator playBtn.setText("play"); playBtn.setDisable(false); - System.out.println("done!"); + LOGGER.info("copying files done!"); } catch (IOException e) { e.printStackTrace(); } @@ -545,7 +544,6 @@ public class MainWindowController { for (int i = 0; i < courses.size(); i++) { if (courses.get(i).getId() == id) { try { -// System.out.println("http://smmdb.ddns.net/courseimg/" + id + "_full.jpg?v=3"); URL url = new URL("http://smmdb.ddns.net/courseimg/" + id + "_full.jpg?v=3"); Image image = new Image(url.toURI().toString()); smmdbImageView.setImage(image); @@ -573,7 +571,6 @@ public class MainWindowController { } }); LOGGER.info("initializing Actions done!"); -// System.out.println("initializing Actions done!"); } @FXML @@ -677,7 +674,7 @@ public class MainWindowController { void cemuTFBtnAction(ActionEvent event) { File cemuDirectory = directoryChooser.showDialog(main.primaryStage); if(cemuDirectory == null){ - System.out.println("No Directory selected"); + LOGGER.info("No Directory selected"); }else{ setCemuPath(cemuDirectory.getAbsolutePath()); saveSettings(); @@ -696,7 +693,7 @@ public class MainWindowController { void romTFBtnAction(ActionEvent event) { File romDirectory = directoryChooser.showDialog(main.primaryStage); if(romDirectory == null){ - System.out.println("No Directory selected"); + LOGGER.info("No Directory selected"); }else{ setRomPath(romDirectory.getAbsolutePath()); saveSettings(); @@ -727,7 +724,7 @@ public class MainWindowController { pm.setMaximum(conn.getContentLength()); // tell the progress bar the total number of bytes we are going to read. FileUtils.copyInputStreamToFile(pmis, new File(downloadFileURL)); //download file + "/mlc01/emulatorSave" pmis.close(); - System.out.println("downloaded successfull"); + LOGGER.info("downloaded successfull"); File downloadFile = new File(downloadFileURL); @@ -765,16 +762,14 @@ public class MainWindowController { //rename zipfile File course = new File(destination + "/course000"); course.renameTo( new File(destination + "/" + courseName)); - System.out.println("Added new course: " + courseName + ", full path is: " + destination + "/" + courseName); + LOGGER.info("Added new course: " + courseName + ", full path is: " + destination + "/" + courseName); } catch (ZipException e) { - e.printStackTrace(); - System.err.println("an error occurred during unziping the file!"); + LOGGER.error("an error occurred during unziping the file!", e); } downloadFile.delete(); } catch (IOException e) { - System.err.println("something went wrong during downloading the course"); - e.printStackTrace(); + LOGGER.error("something went wrong during downloading the course", e); } } @@ -934,7 +929,7 @@ public class MainWindowController { * then add the rom to the local_roms database */ if(exit){ - System.out.println("No parameter set!"); + LOGGER.info("No parameter set!"); }else{ coverName = new File(coverPath).getName(); try { @@ -950,16 +945,14 @@ public class MainWindowController { ImageIO.write(resizeImagePNG, "png", new File(pictureCache+"\\"+coverName)); //save image to pictureCache coverPath = pictureCache+"\\"+coverName; } catch (IOException e) { - System.out.println("Ops something went wrong!"); + LOGGER.error("Ops something went wrong!", e); } try { dbController.addRom(title, coverPath, romPath, titleID, "", "", "", "0"); dbController.loadSingleRom(titleID); } catch (SQLException e) { - // Auto-generated catch block - System.out.println("Oops, something went wrong! Error during adding a game."); - e.printStackTrace(); + LOGGER.error("Oops, something went wrong! Error during adding a game.", e); } } } @@ -980,7 +973,7 @@ public class MainWindowController { Image coverImage = new Image(coverFile.toURI().toString()); generatePosition(); - System.out.println("add " + getxPos()); //TODO debug + LOGGER.info("add " + getxPos()); //TODO debug VBox.setLayoutX(getxPos()); VBox.setLayoutY(getyPos()); VBox.getChildren().addAll(gameTitleLabel,gameBtn); @@ -996,7 +989,7 @@ public class MainWindowController { gameBtn.addEventHandler(MouseEvent.MOUSE_CLICKED, new EventHandler() { @Override public void handle(MouseEvent event) { - System.out.println("selected: "+title+"; ID: "+titleID); + LOGGER.info("selected: "+title+"; ID: "+titleID); //getting the selected game index by comparing event.getSource() with games.get(i).getButton() for(int i=0; i