+ small windows adaptation to the function to get the exe full path

This commit is contained in:
kelson42 committed 2012-04-19 16:22:45 +00:00
1 parent 17a4c42eb3
commit b8a13ede0a
1 file changed
+3
+3
View File
@@ -22,6 +22,8 @@
#ifdef __APPLE__
#include <mach-o/dyld.h>
#include <limits.h>
#elif _WIN32
#include <windows.h>
#endif
#ifndef PATH_MAX
@@ -140,6 +142,7 @@ string getExecutablePath() {
char binRootPath[PATH_MAX];
#ifdef _WIN32
GetModuleFileName( NULL, binRootPath, PATH_MAX);
#elif __APPLE__
uint32_t max = (uint32_t)PATH_MAX;
_NSGetExecutablePath(binRootPath, &max);