From aa7c0b4dca32d92bfb45129988723dca916cf9d0 Mon Sep 17 00:00:00 2001 From: mathusummut Date: Thu, 4 Apr 2019 23:25:28 +0200 Subject: [PATCH] Actual fix for DATADIR --- source/shared_lib/include/platform/common/platform_common.h | 2 +- source/shared_lib/sources/platform/common/platform_common.cpp | 3 ++- source/shared_lib/sources/platform/sdl/gl_wrap.cpp | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/source/shared_lib/include/platform/common/platform_common.h b/source/shared_lib/include/platform/common/platform_common.h index a7f656dc0..2a7cf0b1b 100644 --- a/source/shared_lib/include/platform/common/platform_common.h +++ b/source/shared_lib/include/platform/common/platform_common.h @@ -240,7 +240,7 @@ namespace Shared { bool StartsWith(const std::string &str, const std::string &key); bool EndsWith(const string &str, const string& key); - void endPathWithSlash(string &path, bool requireOSSlash = false); + string endPathWithSlash(string &path, bool requireOSSlash = false); void trimPathWithStartingSlash(string &path); void updatePathClimbingParts(string &path, bool processPreviousDirTokenCheck = true); string formatPath(string path); diff --git a/source/shared_lib/sources/platform/common/platform_common.cpp b/source/shared_lib/sources/platform/common/platform_common.cpp index 776fdcebc..c3b669a04 100644 --- a/source/shared_lib/sources/platform/common/platform_common.cpp +++ b/source/shared_lib/sources/platform/common/platform_common.cpp @@ -552,7 +552,7 @@ namespace Shared { return result; } - void endPathWithSlash(string &path, bool requireOSSlash) { + string endPathWithSlash(string &path, bool requireOSSlash) { if (EndsWith(path, "/") == false && EndsWith(path, "\\") == false) { string seperator = "/"; if (requireOSSlash == true) { @@ -562,6 +562,7 @@ namespace Shared { } path += seperator; } + return path } string formatPath(string path) { diff --git a/source/shared_lib/sources/platform/sdl/gl_wrap.cpp b/source/shared_lib/sources/platform/sdl/gl_wrap.cpp index 60d623321..00210524e 100644 --- a/source/shared_lib/sources/platform/sdl/gl_wrap.cpp +++ b/source/shared_lib/sources/platform/sdl/gl_wrap.cpp @@ -225,7 +225,7 @@ namespace Shared { SDL_SetRelativeMouseMode(SDL_FALSE); SDL_SetRelativeMouseMode(SDL_TRUE); } - + #ifndef WIN32 string icon_file = ""; #if defined(DATADIR)