mirror of https://github.com/stella-emu/stella.git
Fixed bug in Windows, where 'Documents\Stella' wasn't being created.
This commit is contained in:
parent
b7bf3b79b2
commit
b814296a9e
|
@ -71,7 +71,7 @@ OSystemWINDOWS::OSystemWINDOWS()
|
|||
basedir = appdata.getShortPath();
|
||||
if(basedir.length() > 1 && basedir[basedir.length()-1] != '\\')
|
||||
basedir += '\\';
|
||||
basedir += "Stella";
|
||||
basedir += "Stella\\";
|
||||
}
|
||||
else
|
||||
basedir = ".\\"; // otherwise, default to current directory
|
||||
|
@ -79,14 +79,19 @@ OSystemWINDOWS::OSystemWINDOWS()
|
|||
|
||||
setBaseDir(basedir);
|
||||
setConfigFile(basedir + "stella.ini");
|
||||
|
||||
// Create default save/load dir
|
||||
FilesystemNode node(defaultSaveDir());
|
||||
if(!node.exists())
|
||||
node.makeDir();
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
string OSystemWINDOWS::defaultSaveDir() const
|
||||
{
|
||||
HomeFinder homefinder;
|
||||
FilesystemNode desktop(homefinder.getDesktopPath() + "\\Stella");
|
||||
return desktop.isDirectory() ? desktop.getShortPath() : "~\\";
|
||||
FilesystemNode documents(homefinder.getDocumentsPath());
|
||||
return documents.isDirectory() ? documents.getShortPath() + "\\Stella\\" : "~\\";
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
|
Loading…
Reference in New Issue