[Scummvm-cvs-logs] CVS: scummvm/backends/fs/posix posix-fs.cpp,1.15,1.16
Marcus Comstedt
marcus_c at users.sourceforge.net
Mon Nov 3 14:21:06 CET 2003
Update of /cvsroot/scummvm/scummvm/backends/fs/posix
In directory sc8-pr-cvs1:/tmp/cvs-serv18641/fs/posix
Modified Files:
posix-fs.cpp
Log Message:
Use posix-fs on Dreamcast.
Index: posix-fs.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/fs/posix/posix-fs.cpp,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- posix-fs.cpp 8 Oct 2003 22:47:41 -0000 1.15
+++ posix-fs.cpp 3 Nov 2003 22:20:51 -0000 1.16
@@ -18,7 +18,9 @@
* $Header$
*/
-#if defined(UNIX) || defined (__GP32__) //ph0x
+#if defined(UNIX) || defined(__DC__) || defined (__GP32__) //ph0x
+
+#include "stdafx.h"
#include "../fs.h"
@@ -27,7 +29,9 @@
#endif
#include <sys/param.h>
#include <sys/stat.h>
+#ifndef __DC__
#include <dirent.h>
+#endif
#include <stdio.h>
#include <unistd.h>
@@ -80,7 +84,7 @@
}
POSIXFilesystemNode::POSIXFilesystemNode() {
-#if 1
+#ifndef __DC__
char buf[MAXPATHLEN];
getcwd(buf, MAXPATHLEN);
@@ -134,9 +138,13 @@
entry._path = _path;
entry._path += dp->d_name;
+#ifdef __DC__
+ entry._isDirectory = dp->d_size < 0;
+#else
if (stat(entry._path.c_str(), &st))
continue;
entry._isDirectory = S_ISDIR(st.st_mode);
+#endif
// Honor the chosen mode
if ((mode == kListFilesOnly && entry._isDirectory) ||
More information about the Scummvm-git-logs
mailing list