Minor refactoring.

This commit is contained in:
Stephen Anthony 2017-01-14 13:18:12 -03:30
parent b0b807407a
commit c0aa5c83f5
3 changed files with 6 additions and 6 deletions

1
.gitignore vendored
View File

@ -3,3 +3,4 @@ config.mak
src/**/*/.deps src/**/*/.deps
src/**/*.o src/**/*.o
stella stella
*.diff

View File

@ -57,8 +57,7 @@
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
OSystem::OSystem() OSystem::OSystem()
: myConsole(nullptr), : myLauncherUsed(false),
myLauncherUsed(false),
myQuitLoop(false) myQuitLoop(false)
{ {
// Calculate startup time // Calculate startup time
@ -227,8 +226,7 @@ void OSystem::setBaseDir(const string& basedir)
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void OSystem::setConfigFile(const string& file) void OSystem::setConfigFile(const string& file)
{ {
FilesystemNode node(file); myConfigFile = FilesystemNode(file).getPath();
myConfigFile = node.getPath();
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@ -441,10 +439,10 @@ bool OSystem::createLauncher(const string& startdir)
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
string OSystem::getROMInfo(const FilesystemNode& romfile) string OSystem::getROMInfo(const FilesystemNode& romfile)
{ {
string md5, type, id;
unique_ptr<Console> console; unique_ptr<Console> console;
try try
{ {
string md5, type, id;
console = openConsole(romfile, md5, type, id); console = openConsole(romfile, md5, type, id);
} }
catch(const runtime_error& e) catch(const runtime_error& e)

View File

@ -534,7 +534,8 @@ void GameInfoDialog::saveConfig()
// Display properties // Display properties
myGameProperties.set(Display_Format, myFormat->getSelectedTag().toString()); myGameProperties.set(Display_Format, myFormat->getSelectedTag().toString());
myGameProperties.set(Display_YStart, myYStartLabel->getLabel()); myGameProperties.set(Display_YStart, myYStartLabel->getLabel() == "Auto" ? "0" :
myYStartLabel->getLabel());
myGameProperties.set(Display_Height, myHeightLabel->getLabel() == "Auto" ? "0" : myGameProperties.set(Display_Height, myHeightLabel->getLabel() == "Auto" ? "0" :
myHeightLabel->getLabel()); myHeightLabel->getLabel());
myGameProperties.set(Display_Phosphor, myPhosphor->getSelectedTag().toString()); myGameProperties.set(Display_Phosphor, myPhosphor->getSelectedTag().toString());