From 1cbb90d8ea82e728fa8ead8a4004dc53f3a75764 Mon Sep 17 00:00:00 2001 From: Max Lingua Date: Sun, 12 Jan 2014 20:08:50 -0500 Subject: PS2: modular IRX drivers loading --- backends/fs/ps2/ps2-fs.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'backends/fs/ps2/ps2-fs.cpp') diff --git a/backends/fs/ps2/ps2-fs.cpp b/backends/fs/ps2/ps2-fs.cpp index 3a86cb3d9c..1c35d1562a 100644 --- a/backends/fs/ps2/ps2-fs.cpp +++ b/backends/fs/ps2/ps2-fs.cpp @@ -333,7 +333,8 @@ bool Ps2FilesystemNode::getChildren(AbstractFSList &list, ListMode mode, bool hi return false; if (_isRoot) { - list.push_back(new Ps2FilesystemNode("cdfs:")); + if (g_systemPs2->cdPresent()) + list.push_back(new Ps2FilesystemNode("cdfs:")); if (g_systemPs2->hddPresent()) list.push_back(new Ps2FilesystemNode("pfs0:")); @@ -341,7 +342,7 @@ bool Ps2FilesystemNode::getChildren(AbstractFSList &list, ListMode mode, bool hi if (g_systemPs2->usbMassPresent()) list.push_back(new Ps2FilesystemNode("mass:")); - if (g_systemPs2->getBootDevice()==HOST_DEV || g_systemPs2->netPresent()) + if (g_systemPs2->netPresent()) list.push_back(new Ps2FilesystemNode("host:")); if (g_systemPs2->mcPresent()) -- cgit v1.2.3 From 5e36716be5dc55d2fbf0d417b03e065bd09f7946 Mon Sep 17 00:00:00 2001 From: Max Lingua Date: Thu, 23 Jan 2014 18:15:42 -0500 Subject: PS2: Made it quieter unless -DLOGORRHEIC is set --- backends/fs/ps2/ps2-fs.cpp | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) (limited to 'backends/fs/ps2/ps2-fs.cpp') diff --git a/backends/fs/ps2/ps2-fs.cpp b/backends/fs/ps2/ps2-fs.cpp index 1c35d1562a..edf787418f 100644 --- a/backends/fs/ps2/ps2-fs.cpp +++ b/backends/fs/ps2/ps2-fs.cpp @@ -21,9 +21,9 @@ #if defined(__PLAYSTATION2__) -// Disable symbol overrides so that we can use system headers. -#define FORBIDDEN_SYMBOL_ALLOW_ALL - +// Disable symbol overrides so that we can use "FILE" +#define FORBIDDEN_SYMBOL_EXCEPTION_FILE +#define FORBIDDEN_SYMBOL_EXCEPTION_printf #include "backends/fs/ps2/ps2-fs.h" @@ -57,13 +57,13 @@ const char *_lastPathComponent(const Common::String &str) { cur++; - // printf("lastPathComponent path=%s token=%s\n", start, cur); + // dbg_printf("lastPathComponent path=%s token=%s\n", start, cur); return cur; } Ps2FilesystemNode::Ps2FilesystemNode() { - printf("NEW FSNODE()\n"); + dbg_printf("NEW FSNODE()\n"); _isHere = true; _isDirectory = true; @@ -74,7 +74,7 @@ Ps2FilesystemNode::Ps2FilesystemNode() { } Ps2FilesystemNode::Ps2FilesystemNode(const Common::String &path) { - printf("NEW FSNODE(%s)\n", path.c_str()); + dbg_printf("NEW FSNODE(%s)\n", path.c_str()); _path = path; @@ -106,7 +106,7 @@ Ps2FilesystemNode::Ps2FilesystemNode(const Common::String &path) { } Ps2FilesystemNode::Ps2FilesystemNode(const Common::String &path, bool verify) { - printf("NEW FSNODE(%s, %d)\n", path.c_str(), verify); + dbg_printf("NEW FSNODE(%s, %d)\n", path.c_str(), verify); _path = path; @@ -163,24 +163,24 @@ void Ps2FilesystemNode::doverify(void) { _verified = true; - printf(" verify: %s -> ", _path.c_str()); + dbg_printf(" verify: %s -> ", _path.c_str()); #if 0 if (_path.empty()) { - printf("PlayStation 2 Root !\n"); + dbg_printf("PlayStation 2 Root !\n"); _verified = true; return; } if (_path.lastChar() == ':') { - printf("Dev: %s\n", _path.c_str()); + dbg_printf("Dev: %s\n", _path.c_str()); _verified = true; return; } #endif if (_path[3] != ':' && _path[4] != ':') { - printf("relative path !\n"); + dbg_printf("relative path !\n"); _isHere = false; _isDirectory = false; return; @@ -203,7 +203,7 @@ void Ps2FilesystemNode::doverify(void) { fileXioWaitAsync(FXIO_WAIT, &fd); if (!fd) { - printf(" yes [stat]\n"); + dbg_printf(" yes [stat]\n"); return true; } break; @@ -217,11 +217,11 @@ void Ps2FilesystemNode::doverify(void) { #if 1 fd = fio.open(_path.c_str(), O_RDONLY); - printf("_path = %s -- fio.open -> %d\n", _path.c_str(), fd); + dbg_printf("_path = %s -- fio.open -> %d\n", _path.c_str(), fd); if (fd >=0) { fio.close(fd); - printf(" yes [open]\n"); + dbg_printf(" yes [open]\n"); _isHere = true; if (medium==MC_DEV && _path.lastChar()=='/') _isDirectory = true; @@ -233,7 +233,7 @@ void Ps2FilesystemNode::doverify(void) { fd = fio.dopen(_path.c_str()); if (fd >=0) { fio.dclose(fd); - printf(" yes [dopen]\n"); + dbg_printf(" yes [dopen]\n"); _isHere = true; _isDirectory = true; return; @@ -266,13 +266,13 @@ void Ps2FilesystemNode::doverify(void) { _isHere = false; _isDirectory = false; - printf(" no\n"); + dbg_printf(" no\n"); return; } AbstractFSNode *Ps2FilesystemNode::getChild(const Common::String &n) const { - printf("getChild : %s\n", n.c_str()); + dbg_printf("getChild : %s\n", n.c_str()); if (!_isDirectory) return NULL; @@ -327,7 +327,7 @@ AbstractFSNode *Ps2FilesystemNode::getChild(const Common::String &n) const { bool Ps2FilesystemNode::getChildren(AbstractFSList &list, ListMode mode, bool hidden) const { //TODO: honor the hidden flag - // printf("getChildren\n"); + // dbg_printf("getChildren\n"); if (!_isDirectory) return false; @@ -357,7 +357,7 @@ bool Ps2FilesystemNode::getChildren(AbstractFSList &list, ListMode mode, bool hi else fd = fio.dopen(_path.c_str()); - // printf("dopen = %d\n", fd); + // dbg_printf("dopen = %d\n", fd); if (fd >= 0) { iox_dirent_t dirent; @@ -399,7 +399,7 @@ bool Ps2FilesystemNode::getChildren(AbstractFSList &list, ListMode mode, bool hi } AbstractFSNode *Ps2FilesystemNode::getParent() const { - // printf("Ps2FilesystemNode::getParent : path = %s\n", _path.c_str()); + // dbg_printf("Ps2FilesystemNode::getParent : path = %s\n", _path.c_str()); if (_isRoot) return new Ps2FilesystemNode(this); // FIXME : 0 ??? @@ -411,7 +411,7 @@ AbstractFSNode *Ps2FilesystemNode::getParent() const { const char *end = _lastPathComponent(_path); Common::String str(start, end - start); - // printf(" parent = %s\n", str.c_str()); + // dbg_printf(" parent = %s\n", str.c_str()); return new Ps2FilesystemNode(str, true); } -- cgit v1.2.3