Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- std::string MUtility::GetExecutableDirectoryPath() // TODODB: Implement support for linux platform
- {
- std::string returnPath = "FAILED TO FIND EXECUTABLE PATH";
- #if PLATFORM != PLATFORM_WINDOWS
- return "Executable path is only available on the windows platform";
- #else
- char path[EXECUTABLE_PATH_MAX_LENGTH];
- GetModuleFileName(NULL, path, EXECUTABLE_PATH_MAX_LENGTH);
- PathRemoveFileSpec(path);
- returnPath = path;
- std::replace(returnPath.begin(), returnPath.end(), '\\', '/');
- #endif
- return returnPath;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement