summaryrefslogtreecommitdiff
path: root/games/pinball/pinball-0.3.1-hiscore.patch
blob: bf4067409779610404062084d5d8381ec24041c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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) {