X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2Fmain.cpp;h=cacfabdc99b2a0632e8b759636a39b00d73151d9;hb=b156744d80db4f6ff49391edb09e919fb30f8a9b;hp=19bfa6ecde6ccee12be0c00bdbc254fcf99ba49e;hpb=1198f8141fe7d5b04a936935c45af3217064b0d7;p=lugaru.git
diff --git a/Source/main.cpp b/Source/main.cpp
index 19bfa6e..cacfabd 100644
--- a/Source/main.cpp
+++ b/Source/main.cpp
@@ -1,6 +1,6 @@
/*
Copyright (C) 2003, 2010 - Wolfire Games
-Copyright (C) 2010-2016 - Lugaru contributors (see AUTHORS file)
+Copyright (C) 2010-2017 - Lugaru contributors (see AUTHORS file)
This file is part of Lugaru.
@@ -22,7 +22,7 @@ along with Lugaru. If not, see .
#include "Audio/openal_wrapper.hpp"
#include "Graphic/gamegl.hpp"
-#include "MacCompatibility.hpp"
+#include "Platform/Platform.hpp"
#include "User/Settings.hpp"
#include "Version.hpp"
@@ -32,14 +32,14 @@ along with Lugaru. If not, see .
#include
#include
#include
-#include
using namespace Game;
#ifdef WIN32
-#include "win-res/resource.hpp"
#include
#include
+#else
+#include
#endif
extern float multiplier;
@@ -579,7 +579,10 @@ static inline void chdirToAppPath(const char* argv0)
*ptr = '\0';
}
#endif
- chdir(dir);
+ errno = 0;
+ if (chdir(dir) != 0) {
+ printf("Error changing dir to '%s' (%s).\n", dir, strerror(errno));
+ }
free(dir);
}
}