Fix: Game files with space in the name was not handled correctly when run in Vice
This commit is contained in:
parent
4ac6cb7edc
commit
5bba1c75d1
|
@ -662,7 +662,7 @@ public class ScreenshotsPanel extends JPanel
|
|||
}
|
||||
fileChooser.setCurrentDirectory(new File(gameDir));
|
||||
|
||||
FileNameExtensionFilter vicefilter = new FileNameExtensionFilter("Vice runnable files", "d64", "t64", "VSF", "GZ", "crt", "prg", "g64");
|
||||
FileNameExtensionFilter vicefilter = new FileNameExtensionFilter("Vice runnable files", "d64", "t64", "tap", "VSF", "GZ", "crt", "prg", "g64");
|
||||
fileChooser.addChoosableFileFilter(vicefilter);
|
||||
fileChooser.setFileFilter(vicefilter);
|
||||
int value = fileChooser.showOpenDialog(MainWindow.getInstance());
|
||||
|
|
|
@ -418,31 +418,27 @@ public class FileManager
|
|||
}
|
||||
|
||||
//Append game file
|
||||
String gameFileToRun = gameFile;
|
||||
|
||||
|
||||
|
||||
Path gamePath = infoModel.getGamesPath();
|
||||
if (gamePath != null)
|
||||
{
|
||||
if (gamePath.toString().contains("crt"))
|
||||
{
|
||||
command.append("-cartcrt " + gamePath.toString());
|
||||
command.append("-cartcrt \"" + gamePath.toString() + "\"");
|
||||
}
|
||||
else
|
||||
{
|
||||
command.append("-autostart " + gamePath.toString());
|
||||
command.append("-autostart \"" + gamePath.toString() + "\"");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (gameFile.contains("crt"))
|
||||
{
|
||||
command.append("-cartcrt " + decompressIfNeeded(gameFile));
|
||||
command.append("-cartcrt \"" + decompressIfNeeded(gameFile) + "\"");
|
||||
}
|
||||
else
|
||||
{
|
||||
command.append("-autostart " + gameFile);
|
||||
command.append("-autostart \"" + gameFile + "\"");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue