From c11c7724ade0aa1306cc6e4737926f8f317852b3 Mon Sep 17 00:00:00 2001 From: stephena Date: Sat, 16 Feb 2013 19:56:09 +0000 Subject: [PATCH] Added ability to specify separate directories for saving and loading snapshot files. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2612 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba --- Changes.txt | 5 +++ docs/graphics/launcher_options_files.png | Bin 7255 -> 8420 bytes docs/index.html | 10 ++++- src/emucore/EventHandler.cxx | 2 +- src/emucore/OSystem.cxx | 3 +- src/emucore/OSystem.hxx | 14 +++--- src/emucore/Settings.cxx | 6 ++- src/gui/FileSnapDialog.cxx | 55 ++++++++++++++++------- src/gui/FileSnapDialog.hxx | 6 ++- src/gui/LauncherDialog.cxx | 6 ++- src/gui/LauncherDialog.hxx | 9 ++-- src/gui/RomInfoWidget.cxx | 2 +- src/gui/VideoDialog.cxx | 2 +- src/macosx/OSystemMACOSX.cxx | 8 +++- src/macosx/OSystemMACOSX.hxx | 5 ++- src/win32/OSystemWin32.cxx | 8 +++- src/win32/OSystemWin32.hxx | 5 ++- 17 files changed, 105 insertions(+), 41 deletions(-) diff --git a/Changes.txt b/Changes.txt index 3dc7425c7..a1fdb873a 100644 --- a/Changes.txt +++ b/Changes.txt @@ -53,6 +53,11 @@ * Fixed regression in RIOT INTIM reads; at least one known ROM (Mr. Roboto Berzerk hack) wasn't working properly. + * Added support for different directories for saving/loading PNG + files. These are set with the 'snapsavedir' and 'snaploaddir' + commandline arguments (which replace the old 'snapdir'), and are + also available within the UI. + * Updated included PNG and ZLIB libraries to latest stable version. -Have fun! diff --git a/docs/graphics/launcher_options_files.png b/docs/graphics/launcher_options_files.png index eee82230a195b4a3ea8f630cd5f2225b1e9a2ba5..217ca0304bdbf7d1f035e26b10f71402e77985ee 100644 GIT binary patch literal 8420 zcmcI~cU)6xyX_7HB1K?;5pbviBGLo|=|wDrP@JH22#TPTfS`bsK$KBOsfN(&C;^e7 zLuf)^lp;kCq(%uNQUb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gkt5Hpp9gqS1E-*tkw+X%G8*YviZk}@GT})B^pjaZ%|TplK6!xswWM%v z4#-hHYZA2+h;=+}ALrf!$Awy8n|pX37vzFpg-e%sz~}}Gc#8YR>U0E-uiciR zNd2)%rmpkD)qu~Q?Y#)xBAj+F-X271Go=gkMbD7g1Lkq>g35KD4z&5)lO;b(L?=^B z-N4(jE;}*|eq?8URTUL)`sVQ^TzjSF3(bvs+ogO*r<)^9Po6|a`r2Va2T{f+_7C=V zi4-1y*fEG&Q|whqW6}1g#N$n}e<~r+$Q`h3U48-b8>YU+aHd z4^G@qFV|1>sBjQal@25=-z8@Db&w`%S%}@Fz)D3CqM(Y4Q;&wMq z$ESYP7J{y92aoKR$=dNfTR=G#V_KGtg$gQ`cFLzBdH6-UY=C<*%gYAK2WLrV>>Ca~Ad=z3n)p}4i{ z(3}l4#qr;_4zTV3#DpI$oN5!khz{SSBlNXZ{tqesCCdLwQ~&YmUrogOuSam-=Hf*@ zZXz5<8fUB|Fiw&hJk;K^Vp8%7z<0^qTq8NAR-rj0`Q4cwJiJyM^7`cj7C?8KQ+Ws ze6PZ!oZ0hfJB!VzF1Ml%6+d&Z1c|2QqbAEUpmlW%(xl2*%{EYL0nDN zyPjm!H`GR*JN9sHnc++|=;Va=rJ`-swgsjfPkGfbf+6svUCcqNpykr?MX7rntIq?l;tKeWki#kiczzV&U#AEj7XuPd{Mj!Q}$M zq$b_0V~knsUT5-q47`(&@oZoyn1+b(|whX Xj6b(4d5CZE0c@?$pT_^;edE6X -
-snapdir <path>
+
-snapsavedir <path>
The directory to save snapshot files to. + +
-snaploaddir <path>
+ The directory to load snapshot files from. + +
-sssingle <1|0>
Generate single snapshot instead of many, overwriting @@ -2552,7 +2557,8 @@ - + + diff --git a/src/emucore/EventHandler.cxx b/src/emucore/EventHandler.cxx index 174512dab..4ba7db027 100644 --- a/src/emucore/EventHandler.cxx +++ b/src/emucore/EventHandler.cxx @@ -1948,7 +1948,7 @@ void EventHandler::takeSnapshot(uInt32 number) // Figure out the correct snapshot name string filename; bool showmessage = number == 0; - string sspath = myOSystem->snapshotDir() + + string sspath = myOSystem->snapshotSaveDir() + myOSystem->console().properties().get(Cartridge_Name); // Check whether we want multiple snapshots created diff --git a/src/emucore/OSystem.cxx b/src/emucore/OSystem.cxx index 22f1159db..1d2d0c218 100644 --- a/src/emucore/OSystem.cxx +++ b/src/emucore/OSystem.cxx @@ -348,7 +348,8 @@ void OSystem::setConfigPaths() string s; validatePath(myStateDir, "statedir", myBaseDir + "statedir"); - validatePath(mySnapshotDir, "snapdir", defaultSnapDir()); + validatePath(mySnapshotSaveDir, "snapsavedir", defaultSnapSaveDir()); + validatePath(mySnapshotLoadDir, "snaploaddir", defaultSnapLoadDir()); validatePath(myEEPROMDir, "eepromdir", myBaseDir); validatePath(myCfgDir, "cfgdir", myBaseDir + "cfg"); diff --git a/src/emucore/OSystem.hxx b/src/emucore/OSystem.hxx index 1e41b890f..388e0c904 100644 --- a/src/emucore/OSystem.hxx +++ b/src/emucore/OSystem.hxx @@ -314,9 +314,11 @@ class OSystem const string& stateDir() const { return myStateDir; } /** - Return the full/complete directory name for storing PNG snapshots. + Return the full/complete directory name for saving and loading + PNG snapshots. */ - const string& snapshotDir() const { return mySnapshotDir; } + const string& snapshotSaveDir() const { return mySnapshotSaveDir; } + const string& snapshotLoadDir() const { return mySnapshotLoadDir; } /** Return the full/complete directory name for storing EEPROM files. @@ -505,13 +507,14 @@ class OSystem virtual void stateChanged(EventHandler::State state); /** - Returns the default path for the snapshot directory. + Returns the default save and load paths for the snapshot directory. Since this varies greatly among different systems and is the one directory that most end-users care about (vs. config file stuff that usually isn't user-modifiable), we create a special method for it. */ - virtual string defaultSnapDir() { return "~"; } + virtual string defaultSnapSaveDir() { return "~"; } + virtual string defaultSnapLoadDir() { return "~"; } /** Set the position of the application window, generally using @@ -610,7 +613,8 @@ class OSystem enum { kNumUIPalettes = 2 }; string myBaseDir; string myStateDir; - string mySnapshotDir; + string mySnapshotSaveDir; + string mySnapshotLoadDir; string myEEPROMDir; string myCfgDir; diff --git a/src/emucore/Settings.cxx b/src/emucore/Settings.cxx index 7035c7034..203f43f4c 100644 --- a/src/emucore/Settings.cxx +++ b/src/emucore/Settings.cxx @@ -94,7 +94,8 @@ Settings::Settings(OSystem* osystem) setInternal("ctrlcombo", "true"); // Snapshot options - setInternal("snapdir", ""); + setInternal("snapsavedir", ""); + setInternal("snaploaddir", ""); setInternal("sssingle", "false"); setInternal("ss1x", "false"); setInternal("ssinterval", "2"); @@ -398,7 +399,8 @@ void Settings::usage() << " -autoslot <1|0> Automatically switch to next save slot when state saving\n" << " -stats <1|0> Overlay console info during emulation\n" << " -fastscbios <1|0> Disable Supercharger BIOS progress loading bars\n" - << " -snapdir The directory to save snapshot files to\n" + << " -snapsavedir The directory to save snapshot files to\n" + << " -snaploaddir The directory to load snapshot files from\n" << " -sssingle <1|0> Generate single snapshot instead of many\n" << " -ss1x <1|0> Generate TIA snapshot in 1x mode (ignore scaling/effects)\n" << " -ssinterval getHeight() + 3; b = new ButtonWidget(this, font, xpos, ypos, buttonWidth, buttonHeight, - "Snapshot path:", kChooseSnapDirCmd); + "Snapshot save path:", kChooseSnapSaveDirCmd); wid.push_back(b); xpos += buttonWidth + 10; - mySnapPath = new EditTextWidget(this, font, xpos, ypos + 2, + mySnapSavePath = new EditTextWidget(this, font, xpos, ypos + 2, _w - xpos - 10, lineHeight, ""); - wid.push_back(mySnapPath); + wid.push_back(mySnapSavePath); + + // Snapshot path (load files) + xpos = vBorder; ypos += romButton->getHeight() + 3; + b = new ButtonWidget(this, font, xpos, ypos, buttonWidth, buttonHeight, + "Snapshot load path:", kChooseSnapLoadDirCmd); + wid.push_back(b); + xpos += buttonWidth + 10; + mySnapLoadPath = new EditTextWidget(this, font, xpos, ypos + 2, + _w - xpos - 10, lineHeight, ""); + wid.push_back(mySnapLoadPath); // Cheat file xpos = vBorder; ypos += b->getHeight() + 3; @@ -188,7 +198,8 @@ void FileSnapDialog::loadConfig() { const Settings& settings = instance().settings(); myRomPath->setEditString(settings.getString("romdir")); - mySnapPath->setEditString(settings.getString("snapdir")); + mySnapSavePath->setEditString(settings.getString("snapsavedir")); + mySnapLoadPath->setEditString(settings.getString("snaploaddir")); myCheatFile->setEditString(settings.getString("cheatfile")); myPaletteFile->setEditString(settings.getString("palettefile")); myPropsFile->setEditString(settings.getString("propsfile")); @@ -203,7 +214,8 @@ void FileSnapDialog::loadConfig() void FileSnapDialog::saveConfig() { instance().settings().setString("romdir", myRomPath->getEditString()); - instance().settings().setString("snapdir", mySnapPath->getEditString()); + instance().settings().setString("snapsavedir", mySnapSavePath->getEditString()); + instance().settings().setString("snaploaddir", mySnapLoadPath->getEditString()); instance().settings().setString("cheatfile", myCheatFile->getEditString()); instance().settings().setString("palettefile", myPaletteFile->getEditString()); instance().settings().setString("propsfile", myPropsFile->getEditString()); @@ -227,7 +239,8 @@ void FileSnapDialog::setDefaults() node = FilesystemNode("~"); myRomPath->setEditString(node.getShortPath()); - mySnapPath->setEditString(instance().defaultSnapDir()); + mySnapSavePath->setEditString(instance().defaultSnapSaveDir()); + mySnapLoadPath->setEditString(instance().defaultSnapLoadDir()); const string& cheatfile = basedir + "stella.cht"; node = FilesystemNode(cheatfile); @@ -276,9 +289,14 @@ void FileSnapDialog::handleCommand(CommandSender* sender, int cmd, FilesystemNode::kListDirectoriesOnly, kRomDirChosenCmd); break; - case kChooseSnapDirCmd: - myBrowser->show("Select snapshot directory:", mySnapPath->getEditString(), - FilesystemNode::kListDirectoriesOnly, kSnapDirChosenCmd); + case kChooseSnapSaveDirCmd: + myBrowser->show("Select snapshot save directory:", mySnapSavePath->getEditString(), + FilesystemNode::kListDirectoriesOnly, kSnapSaveDirChosenCmd); + break; + + case kChooseSnapLoadDirCmd: + myBrowser->show("Select snapshot load directory:", mySnapLoadPath->getEditString(), + FilesystemNode::kListDirectoriesOnly, kSnapLoadDirChosenCmd); break; case kChooseCheatFileCmd: @@ -313,10 +331,17 @@ void FileSnapDialog::handleCommand(CommandSender* sender, int cmd, break; } - case kSnapDirChosenCmd: + case kSnapSaveDirChosenCmd: { FilesystemNode dir(myBrowser->getResult()); - mySnapPath->setEditString(dir.getShortPath()); + mySnapSavePath->setEditString(dir.getShortPath()); + break; + } + + case kSnapLoadDirChosenCmd: + { + FilesystemNode dir(myBrowser->getResult()); + mySnapLoadPath->setEditString(dir.getShortPath()); break; } diff --git a/src/gui/FileSnapDialog.hxx b/src/gui/FileSnapDialog.hxx index 2e7ec5c1b..4ac4808ff 100644 --- a/src/gui/FileSnapDialog.hxx +++ b/src/gui/FileSnapDialog.hxx @@ -58,7 +58,8 @@ class FileSnapDialog : public Dialog, public CommandSender kChooseCheatFileCmd = 'LOcf', // cheatfile (stella.cht) kChoosePaletteFileCmd = 'LOpf', // palette file (stella.pal) kChoosePropsFileCmd = 'LOpr', // properties file (stella.pro) - kChooseSnapDirCmd = 'LOsn', // snapshot dir + kChooseSnapSaveDirCmd = 'LOss', // snapshot dir (save files) + kChooseSnapLoadDirCmd = 'LOsl', // snapshot dir (load files) kChooseEEPROMDirCmd = 'LOee', // eeprom dir kStateDirChosenCmd = 'LOsc', // state dir changed kCheatFileChosenCmd = 'LOcc', // cheatfile changed @@ -76,7 +77,8 @@ class FileSnapDialog : public Dialog, public CommandSender EditTextWidget* myCheatFile; EditTextWidget* myPaletteFile; EditTextWidget* myPropsFile; - EditTextWidget* mySnapPath; + EditTextWidget* mySnapSavePath; + EditTextWidget* mySnapLoadPath; // Other snapshot settings CheckboxWidget* mySnapSingle; diff --git a/src/gui/LauncherDialog.cxx b/src/gui/LauncherDialog.cxx index 42a81fd1f..53a36b5e6 100644 --- a/src/gui/LauncherDialog.cxx +++ b/src/gui/LauncherDialog.cxx @@ -603,7 +603,11 @@ void LauncherDialog::handleCommand(CommandSender* sender, int cmd, updateListing(); break; - case kSnapDirChosenCmd: + case kSnapSaveDirChosenCmd: + // Stub just in case we need it + break; + + case kSnapLoadDirChosenCmd: // Stub just in case we need it break; diff --git a/src/gui/LauncherDialog.hxx b/src/gui/LauncherDialog.hxx index 27d640d08..4f4d5ae6e 100644 --- a/src/gui/LauncherDialog.hxx +++ b/src/gui/LauncherDialog.hxx @@ -49,10 +49,11 @@ class StringListWidget; // These must be accessible from dialogs created by this class enum { - kRomDirChosenCmd = 'romc', // rom chosen - kSnapDirChosenCmd = 'snpc', // snap chosen - kReloadRomDirCmd = 'rdrl', // reload the current listing - kReloadFiltersCmd = 'rlfl' // reload filtering options and current listing + kRomDirChosenCmd = 'romc', // rom chosen + kSnapSaveDirChosenCmd = 'snsc', // snap chosen (save files) + kSnapLoadDirChosenCmd = 'snlc', // snap chosen (load files) + kReloadRomDirCmd = 'rdrl', // reload the current listing + kReloadFiltersCmd = 'rlfl' // reload filtering options and current listing }; class LauncherDialog : public Dialog diff --git a/src/gui/RomInfoWidget.cxx b/src/gui/RomInfoWidget.cxx index da0327953..38a09a6a1 100644 --- a/src/gui/RomInfoWidget.cxx +++ b/src/gui/RomInfoWidget.cxx @@ -108,7 +108,7 @@ void RomInfoWidget::parseProperties() myRomInfo.clear(); // Get a valid filename representing a snapshot file for this rom - const string& filename = instance().snapshotDir() + + const string& filename = instance().snapshotLoadDir() + myProperties.get(Cartridge_Name) + ".png"; // Read the PNG file diff --git a/src/gui/VideoDialog.cxx b/src/gui/VideoDialog.cxx index 9fa0697b5..9cfa0d548 100644 --- a/src/gui/VideoDialog.cxx +++ b/src/gui/VideoDialog.cxx @@ -174,7 +174,7 @@ VideoDialog::VideoDialog(OSystem* osystem, DialogContainer* parent, // Add message concerning usage const GUI::Font& infofont = instance().infoFont(); - ypos = myTab->getHeight() - 5 - fontHeight - infofont.getFontHeight()- 10; + ypos = myTab->getHeight() - 5 - fontHeight - infofont.getFontHeight() - 10; new StaticTextWidget(myTab, infofont, 10, ypos, font.getStringWidth("(*) Requires application restart"), fontHeight, "(*) Requires application restart", kTextAlignLeft); diff --git a/src/macosx/OSystemMACOSX.cxx b/src/macosx/OSystemMACOSX.cxx index 49dc64eff..e32bc7ca7 100644 --- a/src/macosx/OSystemMACOSX.cxx +++ b/src/macosx/OSystemMACOSX.cxx @@ -46,8 +46,14 @@ OSystemMACOSX::~OSystemMACOSX() } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -string OSystemMACOSX::defaultSnapDir() +string OSystemMACOSX::defaultSnapSaveDir() { FilesystemNode desktop("~/Desktop"); return desktop.isDirectory() ? desktop.getShortPath() : "~"; } + +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +string OSystemMACOSX::defaultSnapLoadDir() +{ + return defaultSnapSaveDir(); +} diff --git a/src/macosx/OSystemMACOSX.hxx b/src/macosx/OSystemMACOSX.hxx index a2c2c9925..750d9a73b 100644 --- a/src/macosx/OSystemMACOSX.hxx +++ b/src/macosx/OSystemMACOSX.hxx @@ -42,9 +42,10 @@ class OSystemMACOSX : public OSystem virtual ~OSystemMACOSX(); /** - Returns the default path for the snapshot directory. + Returns the default paths for the snapshot directory. */ - string defaultSnapDir(); + string defaultSnapSaveDir(); + string defaultSnapLoadDir(); }; #endif diff --git a/src/win32/OSystemWin32.cxx b/src/win32/OSystemWin32.cxx index dc1dcf9ec..0ca877e85 100644 --- a/src/win32/OSystemWin32.cxx +++ b/src/win32/OSystemWin32.cxx @@ -91,13 +91,19 @@ OSystemWin32::~OSystemWin32() } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -string OSystemWin32::defaultSnapDir() +string OSystemWin32::defaultSnapSaveDir() { HomeFinder homefinder; FilesystemNode desktop(homefinder.getDesktopPath()); return desktop.isDirectory() ? desktop.getShortPath() : "~"; } +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +string OSystemWin32::defaultSnapLoadDir() +{ + return defaultSnapSaveDir(); +} + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void OSystemWin32::setAppWindowPos(int x, int y, int w, int h) { diff --git a/src/win32/OSystemWin32.hxx b/src/win32/OSystemWin32.hxx index 8c1f774b0..b3d28771b 100644 --- a/src/win32/OSystemWin32.hxx +++ b/src/win32/OSystemWin32.hxx @@ -44,9 +44,10 @@ class OSystemWin32 : public OSystem public: /** - Returns the default path for the snapshot directory. + Returns the default paths for the snapshot directory. */ - string defaultSnapDir(); + string defaultSnapSaveDir(); + string defaultSnapLoadDir(); /** Move window to given position. The width and height are also
ItemBrief descriptionFor more information,
see CommandLine
Rom pathspecifies location of ROM files-romdir
Snapshot pathspecifies where to load/save snapshots-snapdir
Snapshot save pathspecifies where to save snapshots-snapsavedir
Snapshot load pathspecifies where to load snapshots-snaploaddir
Cheat filespecifies location of cheatfile database-cheatfile
Palette filespecifies location of user palette-palettefile
Properties file specifies location of external stella.pro database-propsfile