summaryrefslogtreecommitdiffstats
path: root/converter/source/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--converter/source/main.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/converter/source/main.cpp b/converter/source/main.cpp
index 7f415d896..0cf3248b9 100644
--- a/converter/source/main.cpp
+++ b/converter/source/main.cpp
@@ -3,7 +3,11 @@
#include "cTimer.h"
#include "cQuicksort.h"
#include "cDeNotch.h"
+#ifdef _WIN32
+#include "dirent.h"
+#else
#include <dirent.h>
+#endif
int main () {
@@ -22,12 +26,15 @@ int main () {
//string* dir_array;
int dir_num_files = 0;
int ctr = 0;
-
+#ifdef _WIN32
+ if(dp = opendir("region\\")){
+#else
if(dp = opendir("region/")){
- while(entry = readdir(dp)){
+#endif
+ while(entry = readdir(dp)){
entrys = entry->d_name;
found = entrys.find(".mcr");
- if ( (found!=std::string::npos) && (entry->d_type==8) ) {
+ if ( (found!=std::string::npos) ) {
str2 = entrys.substr (2,sizeof(entrys));
filexPos = str2.substr (0,(int)str2.find("."));
str3 = str2.substr ((int)str2.find(".")+1, sizeof(str2));