summaryrefslogtreecommitdiff
path: root/games/pinball/pinball-0.3.1-hiscore.patch
diff options
context:
space:
mode:
authorHunter Sezen <ovariegata@yahoo.com>2015-09-04 23:10:41 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2015-09-05 06:25:16 +0700
commitd573a41c06fb151b0f759cb3fdbe7b7d3d56f830 (patch)
treee4bda10fa8916d8c579e67a15541e512bede8ae0 /games/pinball/pinball-0.3.1-hiscore.patch
parenta230fb8b3aa72715d5db7c630f303da74f9ea839 (diff)
downloadslackbuilds-d573a41c06fb151b0f759cb3fdbe7b7d3d56f830.tar.gz
games/pinball: Added (open source pinball simulator).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'games/pinball/pinball-0.3.1-hiscore.patch')
-rw-r--r--games/pinball/pinball-0.3.1-hiscore.patch39
1 files changed, 39 insertions, 0 deletions
diff --git a/games/pinball/pinball-0.3.1-hiscore.patch b/games/pinball/pinball-0.3.1-hiscore.patch
new file mode 100644
index 0000000000..bf40674097
--- /dev/null
+++ b/games/pinball/pinball-0.3.1-hiscore.patch
@@ -0,0 +1,39 @@
+--- pinball-0.3.1/src/Table.cpp~ 2006-08-03 14:59:16.000000000 +0200
++++ pinball-0.3.1/src/Table.cpp 2006-08-03 14:59:16.000000000 +0200
+@@ -247,14 +247,9 @@
+ // Clear old high scores
+ m_mapHighScores.clear();
+
+- //!rzr+ : fix w32
+- string sFileName = m_sTableName + "/" + HIGH_SCORES_FILENAME;
+-#ifdef RZR_PATHRELATIVE
+- sFileName = string( Config::getInstance()->getExeDir() )
+- +"/"+ m_sTableName +".cfg";
+-#else
+- sFileName = string(EM_HIGHSCORE_DIR) + "/" + sFileName;
+-#endif //!rzr-
++ char *home = getenv("HOME");
++ string sFileName = string(home? home:".") + "/.emilia/" + m_sTableName +
++ ".hiscore";
+
+ ifstream file(sFileName.c_str());
+ if (!file) {
+@@ -308,14 +303,10 @@
+ cerr << "No current table name! (the first time is normal...)" << endl;
+ return false;
+ }
+- //!rzr+ : fix w32
+- string sFileName = m_sTableName + "/" + HIGH_SCORES_FILENAME;
+-#ifdef RZR_PATHRELATIVE
+- sFileName = string( Config::getInstance()->getExeDir() )
+- +"/"+ m_sTableName +".cfg";
+-#else
+- sFileName = string(EM_HIGHSCORE_DIR) + "/" + sFileName;
+-#endif //!rzr-
++
++ char *home = getenv("HOME");
++ string sFileName = string(home? home:".") + "/.emilia/" + m_sTableName +
++ ".hiscore";
+
+ ofstream file(sFileName.c_str());//, ios_base::out | ios_base::trunc);
+ if (!file) {