From: | "Michael Sterrett (mr_bones_)" <mr_bones_@g.o> |
---|---|
To: | gentoo-commits@l.g.o |
Subject: | [gentoo-commits] gentoo-x86 commit in games-puzzle/brainparty/files: brainparty-0.5-savegame.patch |
Date: | Fri, 02 Apr 2010 04:42:12 |
Message-Id: | E1NxYhs-0001U8-VM@stork.gentoo.org |
1 | mr_bones_ 10/04/02 04:42:08 |
2 | |
3 | Added: brainparty-0.5-savegame.patch |
4 | Log: |
5 | savegame patch, also from Chris Coleman |
6 | (Portage version: 2.1.7.17/cvs/Linux i686) |
7 | |
8 | Revision Changes Path |
9 | 1.1 games-puzzle/brainparty/files/brainparty-0.5-savegame.patch |
10 | |
11 | file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/games-puzzle/brainparty/files/brainparty-0.5-savegame.patch?rev=1.1&view=markup |
12 | plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/games-puzzle/brainparty/files/brainparty-0.5-savegame.patch?rev=1.1&content-type=text/plain |
13 | |
14 | Index: brainparty-0.5-savegame.patch |
15 | =================================================================== |
16 | --- a/BPGame.cpp 2010-03-11 00:15:34.000000000 +0000 |
17 | +++ b/BPGame.cpp 2010-04-02 04:17:02.640735675 +0100 |
18 | @@ -1294,8 +1294,10 @@ void BPGame::LoadSettings() { |
19 | Secret1 = Secret2 = Secret3 = Secret4 = false; |
20 | NumUnlockedGames = 0; |
21 | |
22 | + string file = string("/.brainparty"); |
23 | + file.insert(0, getenv("HOME")); |
24 | ifstream ifs; |
25 | - ifs.open(".brainparty"); |
26 | + ifs.open(file.c_str()); |
27 | |
28 | FirstRun = false; |
29 | |
30 | @@ -1425,8 +1428,11 @@ void BPGame::LoadSettings() { |
31 | } |
32 | |
33 | void BPGame::SaveSettings() { |
34 | + string file = string("/.brainparty"); |
35 | + file.insert(0, getenv("HOME")); |
36 | + |
37 | ofstream savefile; |
38 | - savefile.open(".brainparty"); |
39 | + savefile.open(file.c_str()); |
40 | savefile << EnableSound << endl; |
41 | savefile << EnableMusic << endl; |
42 | savefile << endl; |