aboutsummaryrefslogtreecommitdiff
path: root/backends/platform
diff options
context:
space:
mode:
Diffstat (limited to 'backends/platform')
-rw-r--r--backends/platform/dc/dc-fs.cpp28
-rw-r--r--backends/platform/dc/selector.cpp12
-rw-r--r--backends/platform/iphone/osys_iphone.cpp6
-rw-r--r--backends/platform/sdl/sdl.cpp4
-rw-r--r--backends/platform/wince/CELauncherDialog.cpp12
-rw-r--r--backends/platform/wince/CELauncherDialog.h2
6 files changed, 32 insertions, 32 deletions
diff --git a/backends/platform/dc/dc-fs.cpp b/backends/platform/dc/dc-fs.cpp
index 0da77e317e..c1b31d4815 100644
--- a/backends/platform/dc/dc-fs.cpp
+++ b/backends/platform/dc/dc-fs.cpp
@@ -36,19 +36,19 @@
*/
class RoninCDFileNode : public AbstractFilesystemNode {
protected:
- String _path;
+ Common::String _path;
public:
- RoninCDFileNode(const String &path) : _path(path) {};
+ RoninCDFileNode(const Common::String &path) : _path(path) {};
virtual bool exists() const { return true; }
- virtual String getName() const { return lastPathComponent(_path, '/'); }
- virtual String getPath() const { return _path; }
+ virtual Common::String getName() const { return lastPathComponent(_path, '/'); }
+ virtual Common::String getPath() const { return _path; }
virtual bool isDirectory() const { return false; }
virtual bool isReadable() const { return true; }
virtual bool isWritable() const { return false; }
- virtual AbstractFilesystemNode *getChild(const String &n) const { return NULL; }
+ virtual AbstractFilesystemNode *getChild(const Common::String &n) const { return NULL; }
virtual bool getChildren(AbstractFSList &list, ListMode mode, bool hidden) const { return false; }
virtual AbstractFilesystemNode *getParent() const;
@@ -58,17 +58,17 @@ public:
/* A directory */
class RoninCDDirectoryNode : public RoninCDFileNode {
public:
- RoninCDDirectoryNode(const String &path) : RoninCDFileNode(path) {};
+ RoninCDDirectoryNode(const Common::String &path) : RoninCDFileNode(path) {};
virtual bool isDirectory() const { return true; }
- virtual AbstractFilesystemNode *getChild(const String &n) const;
+ virtual AbstractFilesystemNode *getChild(const Common::String &n) const;
virtual bool getChildren(AbstractFSList &list, ListMode mode, bool hidden) const;
};
/* A file/directory which does not exist */
class RoninCDNonexistingNode : public RoninCDFileNode {
public:
- RoninCDNonexistingNode(const String &path) : RoninCDFileNode(path) {};
+ RoninCDNonexistingNode(const Common::String &path) : RoninCDFileNode(path) {};
virtual bool exists() const { return false; }
virtual bool isReadable() const { return false; }
@@ -90,8 +90,8 @@ AbstractFilesystemNode *RoninCDFileNode::makeFileNodePath(const Common::String &
}
}
-AbstractFilesystemNode *RoninCDDirectoryNode::getChild(const String &n) const {
- String newPath(_path);
+AbstractFilesystemNode *RoninCDDirectoryNode::getChild(const Common::String &n) const {
+ Common::String newPath(_path);
if (_path.lastChar() != '/')
newPath += '/';
newPath += n;
@@ -109,20 +109,20 @@ bool RoninCDDirectoryNode::getChildren(AbstractFSList &myList, ListMode mode, bo
// ... loop over dir entries using readdir
while ((dp = readdir(dirp)) != NULL) {
- String newPath(_path);
+ Common::String newPath(_path);
if (newPath.lastChar() != '/')
newPath += '/';
newPath += dp->d_name;
if (dp->d_size < 0) {
// Honor the chosen mode
- if (mode == FilesystemNode::kListFilesOnly)
+ if (mode == Common::FilesystemNode::kListFilesOnly)
continue;
myList.push_back(new RoninCDDirectoryNode(newPath+"/"));
} else {
// Honor the chosen mode
- if (mode == FilesystemNode::kListDirectoriesOnly)
+ if (mode == Common::FilesystemNode::kListDirectoriesOnly)
continue;
myList.push_back(new RoninCDFileNode(newPath));
@@ -140,7 +140,7 @@ AbstractFilesystemNode *RoninCDFileNode::getParent() const {
const char *start = _path.c_str();
const char *end = lastPathComponent(_path, '/');
- return new RoninCDDirectoryNode(String(start, end - start));
+ return new RoninCDDirectoryNode(Common::String(start, end - start));
}
AbstractFilesystemNode *OSystem_Dreamcast::makeRootFileNode() const {
diff --git a/backends/platform/dc/selector.cpp b/backends/platform/dc/selector.cpp
index 91c851506f..a4a53e0f65 100644
--- a/backends/platform/dc/selector.cpp
+++ b/backends/platform/dc/selector.cpp
@@ -146,12 +146,12 @@ struct Dir
{
char name[252];
char deficon[256];
- FilesystemNode node;
+ Common::FilesystemNode node;
};
static Game the_game;
-static bool isIcon(const FilesystemNode &entry)
+static bool isIcon(const Common::FilesystemNode &entry)
{
int l = entry.getDisplayName().size();
if (l>4 && !strcasecmp(entry.getDisplayName().c_str()+l-4, ".ICO"))
@@ -198,14 +198,14 @@ static int findGames(Game *games, int max)
{
Dir *dirs = new Dir[MAX_DIR];
int curr_game = 0, curr_dir = 0, num_dirs = 1;
- dirs[0].node = FilesystemNode("");
+ dirs[0].node = Common::FilesystemNode("");
while (curr_game < max && curr_dir < num_dirs) {
strncpy(dirs[curr_dir].name, dirs[curr_dir].node.getPath().c_str(), 252);
dirs[curr_dir].name[251] = '\0';
dirs[curr_dir].deficon[0] = '\0';
- FSList files, fslist;
- dirs[curr_dir++].node.getChildren(fslist, FilesystemNode::kListAll);
- for (FSList::const_iterator entry = fslist.begin(); entry != fslist.end();
+ Common::FSList files, fslist;
+ dirs[curr_dir++].node.getChildren(fslist, Common::FilesystemNode::kListAll);
+ for (Common::FSList::const_iterator entry = fslist.begin(); entry != fslist.end();
++entry) {
if (entry->isDirectory()) {
if (num_dirs < MAX_DIR && strcasecmp(entry->getDisplayName().c_str(),
diff --git a/backends/platform/iphone/osys_iphone.cpp b/backends/platform/iphone/osys_iphone.cpp
index 3d5571cf3a..be42ee1f33 100644
--- a/backends/platform/iphone/osys_iphone.cpp
+++ b/backends/platform/iphone/osys_iphone.cpp
@@ -1199,11 +1199,11 @@ const char* OSystem_IPHONE::getConfigPath() {
void OSystem_IPHONE::migrateApp() {
// Migrate to the new 1.1.3 directory structure, if needed.
- FilesystemNode file("/var/mobile");
+ Common::FilesystemNode file("/var/mobile");
if (file.exists() && file.isDirectory()) {
// We have 1.1.3 or above.
s_is113OrHigher = true;
- file = FilesystemNode(SCUMMVM_ROOT_PATH);
+ file = Common::FilesystemNode(SCUMMVM_ROOT_PATH);
if (!file.exists()) {
system("mkdir " SCUMMVM_ROOT_PATH);
system("mkdir " SCUMMVM_SAVE_PATH);
@@ -1211,7 +1211,7 @@ void OSystem_IPHONE::migrateApp() {
// Copy over the prefs file
system("cp " SCUMMVM_OLD_PREFS_PATH " " SCUMMVM_PREFS_PATH);
- file = FilesystemNode(SCUMMVM_OLD_SAVE_PATH);
+ file = Common::FilesystemNode(SCUMMVM_OLD_SAVE_PATH);
// Copy over old savegames to the new directory.
if (file.exists() && file.isDirectory())
system("cp " SCUMMVM_OLD_SAVE_PATH "/* " SCUMMVM_SAVE_PATH "/");
diff --git a/backends/platform/sdl/sdl.cpp b/backends/platform/sdl/sdl.cpp
index 9abaa3c6fb..6554483eda 100644
--- a/backends/platform/sdl/sdl.cpp
+++ b/backends/platform/sdl/sdl.cpp
@@ -338,12 +338,12 @@ static Common::String getDefaultConfigFileName() {
}
Common::SeekableReadStream *OSystem_SDL::openConfigFileForReading() {
- FilesystemNode file(getDefaultConfigFileName());
+ Common::FilesystemNode file(getDefaultConfigFileName());
return file.openForReading();
}
Common::WriteStream *OSystem_SDL::openConfigFileForWriting() {
- FilesystemNode file(getDefaultConfigFileName());
+ Common::FilesystemNode file(getDefaultConfigFileName());
return file.openForWriting();
}
diff --git a/backends/platform/wince/CELauncherDialog.cpp b/backends/platform/wince/CELauncherDialog.cpp
index edfdad84b3..7e306be114 100644
--- a/backends/platform/wince/CELauncherDialog.cpp
+++ b/backends/platform/wince/CELauncherDialog.cpp
@@ -72,10 +72,10 @@ void CELauncherDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 d
}
}
-void CELauncherDialog::automaticScanDirectory(const FilesystemNode &node) {
+void CELauncherDialog::automaticScanDirectory(const Common::FilesystemNode &node) {
// First check if we have a recognized game in the current directory
- FSList files;
- node.getChildren(files, FilesystemNode::kListFilesOnly);
+ Common::FSList files;
+ node.getChildren(files, Common::FilesystemNode::kListFilesOnly);
// detect
GameList candidates(EngineMan.detectGames(files));
// insert
@@ -85,9 +85,9 @@ void CELauncherDialog::automaticScanDirectory(const FilesystemNode &node) {
addGameToConf(result);
}
// Then recurse on the subdirectories
- FSList dirs;
- node.getChildren(dirs, FilesystemNode::kListDirectoriesOnly);
- for (FSList::const_iterator currentDir = dirs.begin(); currentDir != dirs.end(); ++currentDir)
+ Common::FSList dirs;
+ node.getChildren(dirs, Common::FilesystemNode::kListDirectoriesOnly);
+ for (Common::FSList::const_iterator currentDir = dirs.begin(); currentDir != dirs.end(); ++currentDir)
automaticScanDirectory(*currentDir);
}
diff --git a/backends/platform/wince/CELauncherDialog.h b/backends/platform/wince/CELauncherDialog.h
index 55d177bcb8..a5f3fd0d43 100644
--- a/backends/platform/wince/CELauncherDialog.h
+++ b/backends/platform/wince/CELauncherDialog.h
@@ -36,7 +36,7 @@ public:
virtual void handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data);
protected:
void addGame();
- void automaticScanDirectory(const FilesystemNode &node);
+ void automaticScanDirectory(const Common::FilesystemNode &node);
};
typedef GUI::LauncherDialog GUILauncherDialog;