src/fios.h
changeset 6086 37ea367a54e6
parent 5475 2e6990a8c7c4
child 6088 f1149b4ff932
--- a/src/fios.h	Tue Feb 20 00:01:54 2007 +0000
+++ b/src/fios.h	Tue Feb 20 00:09:23 2007 +0000
@@ -77,10 +77,21 @@
 	bool at_first_entry;
 };
 
-DIR *opendir(const char *path);
+DIR *opendir(const wchar_t *path);
 struct dirent *readdir(DIR *d);
 int closedir(DIR *d);
-
 #endif /* defined(WIN32) */
 
+/**
+ * A wrapper around opendir() which will convert the string from
+ * OPENTTD encoding to that of the filesystem. For all purposes this
+ * function behaves the same as the original opendir function
+ * @param path string to open directory of
+ * @return DIR pointer
+ */
+static inline DIR *ttd_opendir(const char *path)
+{
+	return opendir(OTTD2FS(path));
+}
+
 #endif /* FIOS_H */