From ebe45d253aa70436e9a14cd0294a5bf7e822bf29 Mon Sep 17 00:00:00 2001 From: Mark Vejvoda Date: Tue, 24 Jan 2012 16:14:49 +0000 Subject: [PATCH] - bugfix for custom data path --- source/shared_lib/include/platform/common/platform_common.h | 2 +- .../shared_lib/sources/platform/common/platform_common.cpp | 6 ++++-- 2 files changed, 5 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 026333ab5..98b53d29d 100644 --- a/source/shared_lib/include/platform/common/platform_common.h +++ b/source/shared_lib/include/platform/common/platform_common.h @@ -211,7 +211,7 @@ bool EndsWith(const string &str, const string& key); void endPathWithSlash(string &path, bool requireOSSlash=false); void trimPathWithStartingSlash(string &path); void updatePathClimbingParts(string &path); -void formatPath(string &path); +string formatPath(string path); string replaceAll(string& context, const string& from, const string& to); bool removeFile(string file); diff --git a/source/shared_lib/sources/platform/common/platform_common.cpp b/source/shared_lib/sources/platform/common/platform_common.cpp index 47bef261d..f44abbfdc 100644 --- a/source/shared_lib/sources/platform/common/platform_common.cpp +++ b/source/shared_lib/sources/platform/common/platform_common.cpp @@ -500,9 +500,11 @@ void endPathWithSlash(string &path,bool requireOSSlash) { } } -void formatPath(string &path) { +string formatPath(string path) { replaceAll(path, "\"", ""); replaceAll(path, "//", "/"); + + return path; } void trimPathWithStartingSlash(string &path) { @@ -1595,7 +1597,7 @@ void restoreVideoMode(bool exitingApp) { if(exitingApp == true && SDL_WasInit(SDL_INIT_VIDEO)) { SDL_ShowCursor(1); SDL_WM_GrabInput(SDL_GRAB_OFF); - //SDL_SetGamma(1, 1, 1); + SDL_SetGamma(1, 1, 1); } }