mirror of https://github.com/stella-emu/stella.git
The default snapshot dir is much saner, defaulting to the users'
desktop on OSX and Windows, and the home directory in Linux. The associated commandline has been changed to 'snapdir'. Added 'GL VBO' toggle button to the Video Settings UI, and in general cleaned up its interface. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2282 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
parent
8e868823d9
commit
e8776a79d6
|
@ -41,6 +41,10 @@
|
||||||
error and continue. This should normally always be enabled, but
|
error and continue. This should normally always be enabled, but
|
||||||
can be disabled by developers for testing reasons.
|
can be disabled by developers for testing reasons.
|
||||||
|
|
||||||
|
* Updated default snapshot directory to be much saner and easier to
|
||||||
|
find. For most systems, it now defaults to the users 'Desktop.
|
||||||
|
Note that the commandline argument has changed to 'snapdir'.
|
||||||
|
|
||||||
* The debugger 'print' command now indicates "special" addresses if they
|
* The debugger 'print' command now indicates "special" addresses if they
|
||||||
are read-only (R), write-only (W) or read-write (R/W).
|
are read-only (R), write-only (W) or read-write (R/W).
|
||||||
|
|
||||||
|
|
|
@ -1850,7 +1850,7 @@
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td><pre>-ssdir <path></pre></td>
|
<td><pre>-snapdir <path></pre></td>
|
||||||
<td>The directory to save snapshot files to.</td>
|
<td>The directory to save snapshot files to.</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
@ -2290,7 +2290,7 @@
|
||||||
<tr><td>Cheat file</td><td>specifies location of cheatfile database</td><td>-cheatfile</td></tr>
|
<tr><td>Cheat file</td><td>specifies location of cheatfile database</td><td>-cheatfile</td></tr>
|
||||||
<tr><td>Palette file</td><td>specifies location of user palette</td><td>-palettefile</td></tr>
|
<tr><td>Palette file</td><td>specifies location of user palette</td><td>-palettefile</td></tr>
|
||||||
<tr><td>Properties file </td><td>specifies location of external stella.pro database</td><td>-propsfile</td></tr>
|
<tr><td>Properties file </td><td>specifies location of external stella.pro database</td><td>-propsfile</td></tr>
|
||||||
<tr><td>Snapshot path</td><td>specifies where to load/save snapshots</td><td>-ssdir</td></tr>
|
<tr><td>Snapshot path</td><td>specifies where to load/save snapshots</td><td>-snapdir</td></tr>
|
||||||
<tr><td>EEPROM path</td><td>specifies location of EEPROM files</td><td>-eepromdir</td></tr>
|
<tr><td>EEPROM path</td><td>specifies location of EEPROM files</td><td>-eepromdir</td></tr>
|
||||||
<tr><td>Overwrite snapshots</td><td>whether to overwrite old snapshots</td><td>-sssingle</td></tr>
|
<tr><td>Overwrite snapshots</td><td>whether to overwrite old snapshots</td><td>-sssingle</td></tr>
|
||||||
<tr><td>Snapshot in 1x mode</td><td>save snapshot in 1x mode, without filtering</td><td>-ss1x</td></tr>
|
<tr><td>Snapshot in 1x mode</td><td>save snapshot in 1x mode, without filtering</td><td>-ss1x</td></tr>
|
||||||
|
|
|
@ -316,13 +316,10 @@ void OSystem::setConfigPaths()
|
||||||
FilesystemNode node;
|
FilesystemNode node;
|
||||||
string s;
|
string s;
|
||||||
|
|
||||||
validatePath("statedir", "state", myStateDir);
|
validatePath(myStateDir, "statedir", myBaseDir + "statedir");
|
||||||
|
validatePath(mySnapshotDir, "snapdir", defaultSnapDir());
|
||||||
validatePath("ssdir", "snapshots", mySnapshotDir);
|
validatePath(myEEPROMDir, "eepromdir", myBaseDir);
|
||||||
|
validatePath(myCfgDir, "cfgdir", myBaseDir + "cfg");
|
||||||
validatePath("eepromdir", "", myEEPROMDir);
|
|
||||||
|
|
||||||
validatePath("cfgdir", "cfg", myCfgDir);
|
|
||||||
|
|
||||||
s = mySettings->getString("cheatfile");
|
s = mySettings->getString("cheatfile");
|
||||||
if(s == "") s = myBaseDir + "stella.cht";
|
if(s == "") s = myBaseDir + "stella.cht";
|
||||||
|
@ -872,18 +869,18 @@ void OSystem::resetLoopTiming()
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void OSystem::validatePath(const string& setting, const string& partialpath,
|
void OSystem::validatePath(string& path, const string& setting,
|
||||||
string& fullpath)
|
const string& defaultpath)
|
||||||
{
|
{
|
||||||
const string& s = mySettings->getString(setting) != "" ?
|
const string& s = mySettings->getString(setting) == "" ? defaultpath :
|
||||||
mySettings->getString(setting) : myBaseDir + partialpath;
|
mySettings->getString(setting);
|
||||||
FilesystemNode node(s);
|
FilesystemNode node(s);
|
||||||
if(!node.isDirectory())
|
if(!node.isDirectory())
|
||||||
{
|
{
|
||||||
AbstractFilesystemNode::makeDir(s);
|
AbstractFilesystemNode::makeDir(s);
|
||||||
node = FilesystemNode(node.getPath());
|
node = FilesystemNode(node.getPath());
|
||||||
}
|
}
|
||||||
fullpath = node.getPath();
|
path = node.getPath();
|
||||||
mySettings->setString(setting, node.getPath(false));
|
mySettings->setString(setting, node.getPath(false));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -462,6 +462,15 @@ class OSystem
|
||||||
*/
|
*/
|
||||||
virtual void stateChanged(EventHandler::State state);
|
virtual void stateChanged(EventHandler::State state);
|
||||||
|
|
||||||
|
/**
|
||||||
|
Returns the default path 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 "~"; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Set the position of the application window, generally using
|
Set the position of the application window, generally using
|
||||||
platform-specific code. Note that this method is only ever
|
platform-specific code. Note that this method is only ever
|
||||||
|
@ -660,9 +669,13 @@ class OSystem
|
||||||
Validate the directory name, and create it if necessary.
|
Validate the directory name, and create it if necessary.
|
||||||
Also, update the settings with the new name. For now, validation
|
Also, update the settings with the new name. For now, validation
|
||||||
means that the path must always end with the appropriate separator.
|
means that the path must always end with the appropriate separator.
|
||||||
|
|
||||||
|
@param path The actual path being accessed and created
|
||||||
|
@param setting The setting corresponding to the path being considered
|
||||||
|
@param defaultpath The default path to use if the settings don't exist
|
||||||
*/
|
*/
|
||||||
void validatePath(const string& setting, const string& partialpath,
|
void validatePath(string& path, const string& setting,
|
||||||
string& fullpath);
|
const string& defaultpath);
|
||||||
|
|
||||||
// Copy constructor isn't supported by this class so make it private
|
// Copy constructor isn't supported by this class so make it private
|
||||||
OSystem(const OSystem&);
|
OSystem(const OSystem&);
|
||||||
|
|
|
@ -92,7 +92,7 @@ Settings::Settings(OSystem* osystem)
|
||||||
setInternal("ctrlcombo", "true");
|
setInternal("ctrlcombo", "true");
|
||||||
|
|
||||||
// Snapshot options
|
// Snapshot options
|
||||||
setInternal("ssdir", "");
|
setInternal("snapdir", "");
|
||||||
setInternal("sssingle", "false");
|
setInternal("sssingle", "false");
|
||||||
setInternal("ss1x", "false");
|
setInternal("ss1x", "false");
|
||||||
setInternal("ssinterval", "2");
|
setInternal("ssinterval", "2");
|
||||||
|
@ -411,7 +411,7 @@ void Settings::usage()
|
||||||
<< " -stats <1|0> Overlay console info during emulation\n"
|
<< " -stats <1|0> Overlay console info during emulation\n"
|
||||||
<< " -audiofirst <1|0> Initial audio before video (required for some ATI video cards)\n"
|
<< " -audiofirst <1|0> Initial audio before video (required for some ATI video cards)\n"
|
||||||
<< " -fastscbios <1|0> Disable Supercharger BIOS progress loading bars\n"
|
<< " -fastscbios <1|0> Disable Supercharger BIOS progress loading bars\n"
|
||||||
<< " -ssdir <path> The directory to save snapshot files to\n"
|
<< " -snapdir <path> The directory to save snapshot files to\n"
|
||||||
<< " -sssingle <1|0> Generate single snapshot instead of many\n"
|
<< " -sssingle <1|0> Generate single snapshot instead of many\n"
|
||||||
<< " -ss1x <1|0> Generate TIA snapshot in 1x mode (ignore scaling/effects)\n"
|
<< " -ss1x <1|0> Generate TIA snapshot in 1x mode (ignore scaling/effects)\n"
|
||||||
<< " -ssinterval <number Number of seconds between snapshots in continuous snapshot mode\n"
|
<< " -ssinterval <number Number of seconds between snapshots in continuous snapshot mode\n"
|
||||||
|
|
|
@ -66,15 +66,15 @@ FileSnapDialog::FileSnapDialog(
|
||||||
_w - xpos - 10, lineHeight, "");
|
_w - xpos - 10, lineHeight, "");
|
||||||
wid.push_back(myRomPath);
|
wid.push_back(myRomPath);
|
||||||
|
|
||||||
// State directory
|
// Snapshot path
|
||||||
xpos = vBorder; ypos += romButton->getHeight() + 3;
|
xpos = vBorder; ypos += romButton->getHeight() + 3;
|
||||||
b = new ButtonWidget(this, font, xpos, ypos, buttonWidth, buttonHeight,
|
b = new ButtonWidget(this, font, xpos, ypos, buttonWidth, buttonHeight,
|
||||||
"State path:", kChooseStateDirCmd);
|
"Snapshot path:", kChooseSnapDirCmd);
|
||||||
wid.push_back(b);
|
wid.push_back(b);
|
||||||
xpos += buttonWidth + 10;
|
xpos += buttonWidth + 10;
|
||||||
myStatePath = new EditTextWidget(this, font, xpos, ypos + 2,
|
mySnapPath = new EditTextWidget(this, font, xpos, ypos + 2,
|
||||||
_w - xpos - 10, lineHeight, "");
|
_w - xpos - 10, lineHeight, "");
|
||||||
wid.push_back(myStatePath);
|
wid.push_back(mySnapPath);
|
||||||
|
|
||||||
// Cheat file
|
// Cheat file
|
||||||
xpos = vBorder; ypos += b->getHeight() + 3;
|
xpos = vBorder; ypos += b->getHeight() + 3;
|
||||||
|
@ -106,15 +106,15 @@ FileSnapDialog::FileSnapDialog(
|
||||||
_w - xpos - 10, lineHeight, "");
|
_w - xpos - 10, lineHeight, "");
|
||||||
wid.push_back(myPropsFile);
|
wid.push_back(myPropsFile);
|
||||||
|
|
||||||
// Snapshot path
|
// State directory
|
||||||
xpos = vBorder; ypos += b->getHeight() + 3;
|
xpos = vBorder; ypos += b->getHeight() + 3;
|
||||||
b = new ButtonWidget(this, font, xpos, ypos, buttonWidth, buttonHeight,
|
b = new ButtonWidget(this, font, xpos, ypos, buttonWidth, buttonHeight,
|
||||||
"Snapshot path:", kChooseSnapDirCmd);
|
"State path:", kChooseStateDirCmd);
|
||||||
wid.push_back(b);
|
wid.push_back(b);
|
||||||
xpos += buttonWidth + 10;
|
xpos += buttonWidth + 10;
|
||||||
mySnapPath = new EditTextWidget(this, font, xpos, ypos + 2,
|
myStatePath = new EditTextWidget(this, font, xpos, ypos + 2,
|
||||||
_w - xpos - 10, lineHeight, "");
|
_w - xpos - 10, lineHeight, "");
|
||||||
wid.push_back(mySnapPath);
|
wid.push_back(myStatePath);
|
||||||
|
|
||||||
// EEPROM directory
|
// EEPROM directory
|
||||||
xpos = vBorder; ypos += b->getHeight() + 3;
|
xpos = vBorder; ypos += b->getHeight() + 3;
|
||||||
|
@ -188,12 +188,12 @@ void FileSnapDialog::loadConfig()
|
||||||
{
|
{
|
||||||
const Settings& settings = instance().settings();
|
const Settings& settings = instance().settings();
|
||||||
myRomPath->setEditString(settings.getString("romdir"));
|
myRomPath->setEditString(settings.getString("romdir"));
|
||||||
myStatePath->setEditString(settings.getString("statedir"));
|
mySnapPath->setEditString(settings.getString("snapdir"));
|
||||||
myCheatFile->setEditString(settings.getString("cheatfile"));
|
myCheatFile->setEditString(settings.getString("cheatfile"));
|
||||||
myPaletteFile->setEditString(settings.getString("palettefile"));
|
myPaletteFile->setEditString(settings.getString("palettefile"));
|
||||||
myPropsFile->setEditString(settings.getString("propsfile"));
|
myPropsFile->setEditString(settings.getString("propsfile"));
|
||||||
mySnapPath->setEditString(settings.getString("ssdir"));
|
|
||||||
myEEPROMPath->setEditString(settings.getString("eepromdir"));
|
myEEPROMPath->setEditString(settings.getString("eepromdir"));
|
||||||
|
myStatePath->setEditString(settings.getString("statedir"));
|
||||||
mySnapSingle->setState(settings.getBool("sssingle"));
|
mySnapSingle->setState(settings.getBool("sssingle"));
|
||||||
mySnap1x->setState(settings.getBool("ss1x"));
|
mySnap1x->setState(settings.getBool("ss1x"));
|
||||||
mySnapInterval->setSelected(instance().settings().getString("ssinterval"), "2");
|
mySnapInterval->setSelected(instance().settings().getString("ssinterval"), "2");
|
||||||
|
@ -203,11 +203,11 @@ void FileSnapDialog::loadConfig()
|
||||||
void FileSnapDialog::saveConfig()
|
void FileSnapDialog::saveConfig()
|
||||||
{
|
{
|
||||||
instance().settings().setString("romdir", myRomPath->getEditString());
|
instance().settings().setString("romdir", myRomPath->getEditString());
|
||||||
instance().settings().setString("statedir", myStatePath->getEditString());
|
instance().settings().setString("snapdir", mySnapPath->getEditString());
|
||||||
instance().settings().setString("cheatfile", myCheatFile->getEditString());
|
instance().settings().setString("cheatfile", myCheatFile->getEditString());
|
||||||
instance().settings().setString("palettefile", myPaletteFile->getEditString());
|
instance().settings().setString("palettefile", myPaletteFile->getEditString());
|
||||||
instance().settings().setString("propsfile", myPropsFile->getEditString());
|
instance().settings().setString("propsfile", myPropsFile->getEditString());
|
||||||
instance().settings().setString("ssdir", mySnapPath->getEditString());
|
instance().settings().setString("statedir", myStatePath->getEditString());
|
||||||
instance().settings().setString("eepromdir", myEEPROMPath->getEditString());
|
instance().settings().setString("eepromdir", myEEPROMPath->getEditString());
|
||||||
instance().settings().setBool("sssingle", mySnapSingle->getState());
|
instance().settings().setBool("sssingle", mySnapSingle->getState());
|
||||||
instance().settings().setBool("ss1x", mySnap1x->getState());
|
instance().settings().setBool("ss1x", mySnap1x->getState());
|
||||||
|
@ -227,10 +227,8 @@ void FileSnapDialog::setDefaults()
|
||||||
node = FilesystemNode("~");
|
node = FilesystemNode("~");
|
||||||
myRomPath->setEditString(node.getPath(false));
|
myRomPath->setEditString(node.getPath(false));
|
||||||
|
|
||||||
const string& statedir = basedir + "state";
|
mySnapPath->setEditString(instance().defaultSnapDir());
|
||||||
node = FilesystemNode(statedir);
|
|
||||||
myStatePath->setEditString(node.getPath(false));
|
|
||||||
|
|
||||||
const string& cheatfile = basedir + "stella.cht";
|
const string& cheatfile = basedir + "stella.cht";
|
||||||
node = FilesystemNode(cheatfile);
|
node = FilesystemNode(cheatfile);
|
||||||
myCheatFile->setEditString(node.getPath(false));
|
myCheatFile->setEditString(node.getPath(false));
|
||||||
|
@ -247,9 +245,9 @@ void FileSnapDialog::setDefaults()
|
||||||
node = FilesystemNode(eepromdir);
|
node = FilesystemNode(eepromdir);
|
||||||
myEEPROMPath->setEditString(node.getPath(false));
|
myEEPROMPath->setEditString(node.getPath(false));
|
||||||
|
|
||||||
const string& ssdir = basedir + "snapshots";
|
const string& statedir = basedir + "state";
|
||||||
node = FilesystemNode(ssdir);
|
node = FilesystemNode(statedir);
|
||||||
mySnapPath->setEditString(node.getPath(false));
|
myStatePath->setEditString(node.getPath(false));
|
||||||
|
|
||||||
mySnapSingle->setState(false);
|
mySnapSingle->setState(false);
|
||||||
mySnap1x->setState(false);
|
mySnap1x->setState(false);
|
||||||
|
@ -278,9 +276,9 @@ void FileSnapDialog::handleCommand(CommandSender* sender, int cmd,
|
||||||
FilesystemNode::kListDirectoriesOnly, kRomDirChosenCmd);
|
FilesystemNode::kListDirectoriesOnly, kRomDirChosenCmd);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case kChooseStateDirCmd:
|
case kChooseSnapDirCmd:
|
||||||
myBrowser->show("Select state directory:", myStatePath->getEditString(),
|
myBrowser->show("Select snapshot directory:", mySnapPath->getEditString(),
|
||||||
FilesystemNode::kListDirectoriesOnly, kStateDirChosenCmd);
|
FilesystemNode::kListDirectoriesOnly, kSnapDirChosenCmd);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case kChooseCheatFileCmd:
|
case kChooseCheatFileCmd:
|
||||||
|
@ -298,16 +296,16 @@ void FileSnapDialog::handleCommand(CommandSender* sender, int cmd,
|
||||||
FilesystemNode::kListAll, kPropsFileChosenCmd);
|
FilesystemNode::kListAll, kPropsFileChosenCmd);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case kChooseSnapDirCmd:
|
|
||||||
myBrowser->show("Select snapshot directory:", mySnapPath->getEditString(),
|
|
||||||
FilesystemNode::kListDirectoriesOnly, kSnapDirChosenCmd);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case kChooseEEPROMDirCmd:
|
case kChooseEEPROMDirCmd:
|
||||||
myBrowser->show("Select EEPROM directory:", myEEPROMPath->getEditString(),
|
myBrowser->show("Select EEPROM directory:", myEEPROMPath->getEditString(),
|
||||||
FilesystemNode::kListDirectoriesOnly, kEEPROMDirChosenCmd);
|
FilesystemNode::kListDirectoriesOnly, kEEPROMDirChosenCmd);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case kChooseStateDirCmd:
|
||||||
|
myBrowser->show("Select state directory:", myStatePath->getEditString(),
|
||||||
|
FilesystemNode::kListDirectoriesOnly, kStateDirChosenCmd);
|
||||||
|
break;
|
||||||
|
|
||||||
case kRomDirChosenCmd:
|
case kRomDirChosenCmd:
|
||||||
{
|
{
|
||||||
FilesystemNode dir(myBrowser->getResult());
|
FilesystemNode dir(myBrowser->getResult());
|
||||||
|
@ -315,10 +313,10 @@ void FileSnapDialog::handleCommand(CommandSender* sender, int cmd,
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case kStateDirChosenCmd:
|
case kSnapDirChosenCmd:
|
||||||
{
|
{
|
||||||
FilesystemNode dir(myBrowser->getResult());
|
FilesystemNode dir(myBrowser->getResult());
|
||||||
myStatePath->setEditString(dir.getPath(false));
|
mySnapPath->setEditString(dir.getPath(false));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -343,13 +341,6 @@ void FileSnapDialog::handleCommand(CommandSender* sender, int cmd,
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case kSnapDirChosenCmd:
|
|
||||||
{
|
|
||||||
FilesystemNode dir(myBrowser->getResult());
|
|
||||||
mySnapPath->setEditString(dir.getPath(false));
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
case kEEPROMDirChosenCmd:
|
case kEEPROMDirChosenCmd:
|
||||||
{
|
{
|
||||||
FilesystemNode dir(myBrowser->getResult());
|
FilesystemNode dir(myBrowser->getResult());
|
||||||
|
@ -357,6 +348,13 @@ void FileSnapDialog::handleCommand(CommandSender* sender, int cmd,
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case kStateDirChosenCmd:
|
||||||
|
{
|
||||||
|
FilesystemNode dir(myBrowser->getResult());
|
||||||
|
myStatePath->setEditString(dir.getPath(false));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case kReloadRomDirCmd:
|
case kReloadRomDirCmd:
|
||||||
sendCommand(kReloadRomDirCmd, 0, 0);
|
sendCommand(kReloadRomDirCmd, 0, 0);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -113,7 +113,7 @@ VideoDialog::VideoDialog(OSystem* osystem, DialogContainer* parent,
|
||||||
items.push_back(instance().supportedResolutions()[i].name,
|
items.push_back(instance().supportedResolutions()[i].name,
|
||||||
instance().supportedResolutions()[i].name);
|
instance().supportedResolutions()[i].name);
|
||||||
myFSResPopup = new PopUpWidget(myTab, font, xpos, ypos, pwidth,
|
myFSResPopup = new PopUpWidget(myTab, font, xpos, ypos, pwidth,
|
||||||
lineHeight, items, "FS Res: ", lwidth);
|
lineHeight, items, "Fullscrn Res: ", lwidth);
|
||||||
wid.push_back(myFSResPopup);
|
wid.push_back(myFSResPopup);
|
||||||
ypos += lineHeight + 4;
|
ypos += lineHeight + 4;
|
||||||
|
|
||||||
|
@ -195,24 +195,39 @@ VideoDialog::VideoDialog(OSystem* osystem, DialogContainer* parent,
|
||||||
wid.push_back(myFullscreenPopup);
|
wid.push_back(myFullscreenPopup);
|
||||||
ypos += lineHeight + 4;
|
ypos += lineHeight + 4;
|
||||||
|
|
||||||
// PAL color-loss effect
|
|
||||||
myColorLossCheckbox = new CheckboxWidget(myTab, font, xpos, ypos,
|
|
||||||
"PAL color-loss");
|
|
||||||
wid.push_back(myColorLossCheckbox);
|
|
||||||
ypos += lineHeight + 4;
|
|
||||||
|
|
||||||
// GL FS stretch
|
// GL FS stretch
|
||||||
myGLStretchCheckbox = new CheckboxWidget(myTab, font, xpos, ypos,
|
myGLStretchCheckbox = new CheckboxWidget(myTab, font, xpos, ypos,
|
||||||
"GL FS Stretch");
|
"GL FS Stretch");
|
||||||
wid.push_back(myGLStretchCheckbox);
|
wid.push_back(myGLStretchCheckbox);
|
||||||
ypos += lineHeight + 4;
|
ypos += lineHeight + 4;
|
||||||
|
|
||||||
|
// Use VBO in OpenGL
|
||||||
|
myUseVBOCheckbox = new CheckboxWidget(myTab, font, xpos, ypos,
|
||||||
|
"GL VBO");
|
||||||
|
wid.push_back(myUseVBOCheckbox);
|
||||||
|
ypos += lineHeight + 4;
|
||||||
|
|
||||||
// Use sync to vblank in OpenGL
|
// Use sync to vblank in OpenGL
|
||||||
myUseVSyncCheckbox = new CheckboxWidget(myTab, font, xpos, ypos,
|
myUseVSyncCheckbox = new CheckboxWidget(myTab, font, xpos, ypos,
|
||||||
"GL VSync");
|
"GL VSync");
|
||||||
wid.push_back(myUseVSyncCheckbox);
|
wid.push_back(myUseVSyncCheckbox);
|
||||||
ypos += lineHeight + 4;
|
ypos += lineHeight + 4;
|
||||||
|
|
||||||
|
ypos += lineHeight;
|
||||||
|
|
||||||
|
// PAL color-loss effect
|
||||||
|
myColorLossCheckbox = new CheckboxWidget(myTab, font, xpos, ypos,
|
||||||
|
"PAL color-loss");
|
||||||
|
wid.push_back(myColorLossCheckbox);
|
||||||
|
ypos += lineHeight + 4;
|
||||||
|
|
||||||
|
// Skip progress load bars for SuperCharger ROMs
|
||||||
|
// Doesn't really belong here, but I couldn't find a better place for it
|
||||||
|
myFastSCBiosCheckbox = new CheckboxWidget(myTab, font, xpos, ypos,
|
||||||
|
"Fast SC/AR BIOS");
|
||||||
|
wid.push_back(myFastSCBiosCheckbox);
|
||||||
|
ypos += lineHeight + 4;
|
||||||
|
|
||||||
// Show UI messages onscreen
|
// Show UI messages onscreen
|
||||||
myUIMessagesCheckbox = new CheckboxWidget(myTab, font, xpos, ypos,
|
myUIMessagesCheckbox = new CheckboxWidget(myTab, font, xpos, ypos,
|
||||||
"Show UI messages");
|
"Show UI messages");
|
||||||
|
@ -225,16 +240,10 @@ VideoDialog::VideoDialog(OSystem* osystem, DialogContainer* parent,
|
||||||
wid.push_back(myCenterCheckbox);
|
wid.push_back(myCenterCheckbox);
|
||||||
ypos += lineHeight + 4;
|
ypos += lineHeight + 4;
|
||||||
|
|
||||||
// Skip progress load bars for SuperCharger ROMs
|
|
||||||
// Doesn't really belong here, but I couldn't find a better place for it
|
|
||||||
myFastSCBiosCheckbox = new CheckboxWidget(myTab, font, xpos, ypos,
|
|
||||||
"Fast SC/AR BIOS");
|
|
||||||
wid.push_back(myFastSCBiosCheckbox);
|
|
||||||
ypos += lineHeight + 4;
|
|
||||||
|
|
||||||
// Add items for tab 0
|
// Add items for tab 0
|
||||||
addToFocusList(wid, tabID);
|
addToFocusList(wid, tabID);
|
||||||
|
|
||||||
|
#if 0
|
||||||
//////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////
|
||||||
// 2) TV effects options
|
// 2) TV effects options
|
||||||
wid.clear();
|
wid.clear();
|
||||||
|
@ -244,6 +253,7 @@ VideoDialog::VideoDialog(OSystem* osystem, DialogContainer* parent,
|
||||||
|
|
||||||
// Add items for tab 2
|
// Add items for tab 2
|
||||||
addToFocusList(wid, tabID);
|
addToFocusList(wid, tabID);
|
||||||
|
#endif
|
||||||
|
|
||||||
// Activate the first tab
|
// Activate the first tab
|
||||||
myTab->setActiveTab(0);
|
myTab->setActiveTab(0);
|
||||||
|
@ -265,6 +275,7 @@ VideoDialog::VideoDialog(OSystem* osystem, DialogContainer* parent,
|
||||||
myPAspectRatioSlider->clearFlags(WIDGET_ENABLED);
|
myPAspectRatioSlider->clearFlags(WIDGET_ENABLED);
|
||||||
myPAspectRatioLabel->clearFlags(WIDGET_ENABLED);
|
myPAspectRatioLabel->clearFlags(WIDGET_ENABLED);
|
||||||
myGLStretchCheckbox->clearFlags(WIDGET_ENABLED);
|
myGLStretchCheckbox->clearFlags(WIDGET_ENABLED);
|
||||||
|
myUseVBOCheckbox->clearFlags(WIDGET_ENABLED);
|
||||||
myUseVSyncCheckbox->clearFlags(WIDGET_ENABLED);
|
myUseVSyncCheckbox->clearFlags(WIDGET_ENABLED);
|
||||||
#endif
|
#endif
|
||||||
#ifndef WINDOWED_SUPPORT
|
#ifndef WINDOWED_SUPPORT
|
||||||
|
@ -345,6 +356,10 @@ void VideoDialog::loadConfig()
|
||||||
myGLStretchCheckbox->setState(instance().settings().getBool("gl_fsmax"));
|
myGLStretchCheckbox->setState(instance().settings().getBool("gl_fsmax"));
|
||||||
myGLStretchCheckbox->setEnabled(gl);
|
myGLStretchCheckbox->setEnabled(gl);
|
||||||
|
|
||||||
|
// Use VBO (GL mode only)
|
||||||
|
myUseVBOCheckbox->setState(instance().settings().getBool("gl_vbo"));
|
||||||
|
myUseVBOCheckbox->setEnabled(gl);
|
||||||
|
|
||||||
// Use sync to vertical blank (GL mode only)
|
// Use sync to vertical blank (GL mode only)
|
||||||
myUseVSyncCheckbox->setState(instance().settings().getBool("gl_vsync"));
|
myUseVSyncCheckbox->setState(instance().settings().getBool("gl_vsync"));
|
||||||
myUseVSyncCheckbox->setEnabled(gl);
|
myUseVSyncCheckbox->setEnabled(gl);
|
||||||
|
@ -405,6 +420,9 @@ void VideoDialog::saveConfig()
|
||||||
// GL stretch setting
|
// GL stretch setting
|
||||||
instance().settings().setBool("gl_fsmax", myGLStretchCheckbox->getState());
|
instance().settings().setBool("gl_fsmax", myGLStretchCheckbox->getState());
|
||||||
|
|
||||||
|
// Use VBO (GL mode only)
|
||||||
|
instance().settings().setBool("gl_vbo", myUseVBOCheckbox->getState());
|
||||||
|
|
||||||
// Use sync to vertical blank (GL mode only)
|
// Use sync to vertical blank (GL mode only)
|
||||||
instance().settings().setBool("gl_vsync", myUseVSyncCheckbox->getState());
|
instance().settings().setBool("gl_vsync", myUseVSyncCheckbox->getState());
|
||||||
|
|
||||||
|
@ -441,6 +459,7 @@ void VideoDialog::setDefaults()
|
||||||
myFullscreenPopup->setSelected("0", "");
|
myFullscreenPopup->setSelected("0", "");
|
||||||
myColorLossCheckbox->setState(false);
|
myColorLossCheckbox->setState(false);
|
||||||
myGLStretchCheckbox->setState(false);
|
myGLStretchCheckbox->setState(false);
|
||||||
|
myUseVBOCheckbox->setState(true);
|
||||||
myUseVSyncCheckbox->setState(true);
|
myUseVSyncCheckbox->setState(true);
|
||||||
myUIMessagesCheckbox->setState(true);
|
myUIMessagesCheckbox->setState(true);
|
||||||
myCenterCheckbox->setState(false);
|
myCenterCheckbox->setState(false);
|
||||||
|
|
|
@ -72,6 +72,7 @@ class VideoDialog : public Dialog
|
||||||
PopUpWidget* myFullscreenPopup;
|
PopUpWidget* myFullscreenPopup;
|
||||||
CheckboxWidget* myColorLossCheckbox;
|
CheckboxWidget* myColorLossCheckbox;
|
||||||
CheckboxWidget* myGLStretchCheckbox;
|
CheckboxWidget* myGLStretchCheckbox;
|
||||||
|
CheckboxWidget* myUseVBOCheckbox;
|
||||||
CheckboxWidget* myUseVSyncCheckbox;
|
CheckboxWidget* myUseVSyncCheckbox;
|
||||||
CheckboxWidget* myUIMessagesCheckbox;
|
CheckboxWidget* myUIMessagesCheckbox;
|
||||||
CheckboxWidget* myCenterCheckbox;
|
CheckboxWidget* myCenterCheckbox;
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
// $Id$
|
// $Id$
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
|
#include "FSNode.hxx"
|
||||||
#include "OSystemMACOSX.hxx"
|
#include "OSystemMACOSX.hxx"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -43,3 +44,10 @@ OSystemMACOSX::OSystemMACOSX()
|
||||||
OSystemMACOSX::~OSystemMACOSX()
|
OSystemMACOSX::~OSystemMACOSX()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
string OSystemMACOSX::defaultSnapDir()
|
||||||
|
{
|
||||||
|
FilesystemNode desktop("~/Desktop");
|
||||||
|
return desktop.isDirectory() ? desktop.getPath(false) : "~";
|
||||||
|
}
|
||||||
|
|
|
@ -40,6 +40,11 @@ class OSystemMACOSX : public OSystem
|
||||||
Destructor
|
Destructor
|
||||||
*/
|
*/
|
||||||
virtual ~OSystemMACOSX();
|
virtual ~OSystemMACOSX();
|
||||||
|
|
||||||
|
/**
|
||||||
|
Returns the default path for the snapshot directory.
|
||||||
|
*/
|
||||||
|
string defaultSnapDir();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
#include <shlobj.h>
|
#include <shlobj.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Used to determine the location of the 'HOME' and 'APPDATA' folders.
|
* Used to determine the location of the various Win32 user/system folders.
|
||||||
*
|
*
|
||||||
* Win98 and earlier don't have SHGetFolderPath in shell32.dll.
|
* Win98 and earlier don't have SHGetFolderPath in shell32.dll.
|
||||||
* Microsoft recommend that we load shfolder.dll at run time and
|
* Microsoft recommend that we load shfolder.dll at run time and
|
||||||
|
@ -74,6 +74,18 @@ class HomeFinder
|
||||||
return (result == 0) ? folder_path : "";
|
return (result == 0) ? folder_path : "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Wrapper for SHGetFolderPathA, returning the 'DESKTOPDIRECTORY' folder
|
||||||
|
(or an empty string if the folder couldn't be determined. */
|
||||||
|
string getDesktopPath() const
|
||||||
|
{
|
||||||
|
if(!myFolderPathFunc) return "";
|
||||||
|
char folder_path[MAX_PATH];
|
||||||
|
HRESULT const result = (myFolderPathFunc)
|
||||||
|
(NULL, CSIDL_DESKTOPDIRECTORY | CSIDL_FLAG_CREATE, NULL, 0, folder_path);
|
||||||
|
|
||||||
|
return (result == 0) ? folder_path : "";
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
typedef HRESULT (__stdcall * function_pointer)(HWND, int, HANDLE, DWORD, LPCSTR);
|
typedef HRESULT (__stdcall * function_pointer)(HWND, int, HANDLE, DWORD, LPCSTR);
|
||||||
|
|
||||||
|
|
|
@ -90,6 +90,14 @@ OSystemWin32::~OSystemWin32()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
string OSystemWin32::defaultSnapDir()
|
||||||
|
{
|
||||||
|
HomeFinder homefinder;
|
||||||
|
FilesystemNode desktop(homefinder.getDesktopPath());
|
||||||
|
return desktop.isDirectory() ? desktop.getPath(false) : "~";
|
||||||
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void OSystemWin32::setAppWindowPos(int x, int y, int w, int h)
|
void OSystemWin32::setAppWindowPos(int x, int y, int w, int h)
|
||||||
{
|
{
|
||||||
|
|
|
@ -43,6 +43,11 @@ class OSystemWin32 : public OSystem
|
||||||
virtual ~OSystemWin32();
|
virtual ~OSystemWin32();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
Returns the default path for the snapshot directory.
|
||||||
|
*/
|
||||||
|
string defaultSnapDir();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Move window to given position. The width and height are also
|
Move window to given position. The width and height are also
|
||||||
required for the underlying function, but the window size itself
|
required for the underlying function, but the window size itself
|
||||||
|
|
Loading…
Reference in New Issue