Esempio n. 1
0
 private void loadRomFromZip(String zipName) throws IOException {
   final String romName = selectRomInZip(listRomsInZip(zipName));
   if (romName != null) {
     final File extractedFile = extractRomFromZip(zipName, romName);
     if (extractedFile != null) {
       extractedFile.deleteOnExit();
       nes.loadROM(extractedFile.getCanonicalPath());
     }
   }
 }
Esempio n. 2
0
 private void loadROM(String path) {
   if (path.endsWith(".zip") || path.endsWith(".ZIP")) {
     try {
       loadRomFromZip(path);
     } catch (IOException ex) {
       this.messageBox(
           "Could not load file:\nFile does not exist or is not a valid NES game.\n"
               + ex.getMessage());
     }
   } else {
     nes.loadROM(path);
   }
 }