diff options
author | Dmitry Marakasov <amdmi3@FreeBSD.org> | 2009-08-13 23:45:26 +0000 |
---|---|---|
committer | Dmitry Marakasov <amdmi3@FreeBSD.org> | 2009-08-13 23:45:26 +0000 |
commit | ed92177efc40e84c3773d9d483ab610c83a26fca (patch) | |
tree | 340e651c5f59188cfd42f4d7c29e91a0a5e88d45 /games/rigsofrods/files/patch-main-source-Settings.cpp | |
parent | 5386a4a37a19c78c29cd7b57aff1dfb0c73e11f6 (diff) |
Notes
Diffstat (limited to 'games/rigsofrods/files/patch-main-source-Settings.cpp')
-rw-r--r-- | games/rigsofrods/files/patch-main-source-Settings.cpp | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/games/rigsofrods/files/patch-main-source-Settings.cpp b/games/rigsofrods/files/patch-main-source-Settings.cpp index 50c6c9a5a671..6b557a701c58 100644 --- a/games/rigsofrods/files/patch-main-source-Settings.cpp +++ b/games/rigsofrods/files/patch-main-source-Settings.cpp @@ -1,22 +1,22 @@ ---- main/source/Settings.cpp.orig 2009-02-22 20:59:55.000000000 +0300 -+++ main/source/Settings.cpp 2009-04-09 07:24:33.000000000 +0400 -@@ -123,17 +123,10 @@ - //true program path is impossible to get from POSIX functions - //lets hack! - pid_t pid = getpid(); -- char procpath[256]; -- sprintf(procpath, "/proc/%d/exe", pid); -- int ch = readlink(procpath,program_path,240); -- if (ch != -1) -- { -- program_path[ch] = 0; -- path_descend(program_path); -- } else return false; -+ strcpy(program_path, "%%DATADIR%%/"); - //user path is easy - strncpy(user_path, getenv ("HOME"), 240); -- sprintf(user_path, "%s/RigsOfRods/", user_path); -+ sprintf(user_path, "%s/.RigsOfRods/", user_path); - #elif OGRE_PLATFORM == OGRE_PLATFORM_APPLE - //found this code, will look later - std::string path = "./"; +--- main/source/Settings.cpp.orig 2009-06-17 00:15:08.000000000 +0400 ++++ main/source/Settings.cpp 2009-08-13 04:10:33.000000000 +0400 +@@ -132,17 +132,10 @@ + //true program path is impossible to get from POSIX functions
+ //lets hack!
+ pid_t pid = getpid();
+- char procpath[256];
+- sprintf(procpath, "/proc/%d/exe", pid);
+- int ch = readlink(procpath,program_path,240);
+- if (ch != -1)
+- {
+- program_path[ch] = 0;
+- path_descend(program_path);
+- } else return false;
++ strcpy(program_path, "%%DATADIR%%/");
+ //user path is easy
+ strncpy(user_path, getenv ("HOME"), 240);
+- sprintf(user_path, "%s/RigsOfRods/", user_path);
++ sprintf(user_path, "%s/.RigsOfRods/", user_path);
+ #elif OGRE_PLATFORM == OGRE_PLATFORM_APPLE
+ //found this code, will look later
+ std::string path = "./";
|