mirror of https://github.com/stella-emu/stella.git
More R77 improvements.
- Don't allow ROM launcher to go above '/mnt/games' - Remember 'lastrom' selected in ROM launcher
This commit is contained in:
parent
f508ca2634
commit
374a318556
|
@ -15,6 +15,12 @@
|
|||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//============================================================================
|
||||
|
||||
#if defined(RETRON77)
|
||||
#define ROOT_DIR "/mnt/games/"
|
||||
#else
|
||||
#define ROOT_DIR "/"
|
||||
#endif
|
||||
|
||||
#include "FSNodePOSIX.hxx"
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
@ -38,7 +44,7 @@ void FilesystemNodePOSIX::setFlags()
|
|||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
FilesystemNodePOSIX::FilesystemNodePOSIX()
|
||||
: _path("/"), // The root dir.
|
||||
: _path(ROOT_DIR),
|
||||
_displayName(_path),
|
||||
_isValid(true),
|
||||
_isFile(false),
|
||||
|
@ -230,7 +236,7 @@ bool FilesystemNodePOSIX::rename(const string& newfile)
|
|||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
AbstractFSNodePtr FilesystemNodePOSIX::getParent() const
|
||||
{
|
||||
if (_path == "/")
|
||||
if (_path == ROOT_DIR)
|
||||
return nullptr;
|
||||
|
||||
const char* start = _path.c_str();
|
||||
|
|
|
@ -64,14 +64,15 @@ bool SettingsR77::saveConfigFile(const string& cfgfile) const
|
|||
// most of them. This may also fix reported issues of the config file
|
||||
// becoming corrupt.
|
||||
//
|
||||
// There is currently only one setting that can be changed - 'fullscreen'
|
||||
// It determines whether to use 4:3 or 16:9 mode
|
||||
// There are currently only a few settings that can be changed
|
||||
// These will be expanded as more support is added
|
||||
|
||||
ofstream out(cfgfile);
|
||||
if(!out || !out.is_open())
|
||||
return false;
|
||||
|
||||
out << "fullscreen = " << getString("fullscreen") << endl;
|
||||
out << "lastrom = " << getString("lastrom") << endl;
|
||||
|
||||
out.flush();
|
||||
out.close();
|
||||
|
|
Loading…
Reference in New Issue