summaryrefslogtreecommitdiff
path: root/games/megamario/patches/logfile.diff
blob: 741e0ffc8e66f9a8c45032fb7590224cd0a17961 (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
diff -Naur a/src/main.cpp b/src/main.cpp
--- a/src/main.cpp	2007-03-07 10:35:04.000000000 -0500
+++ b/src/main.cpp	2016-08-14 16:53:05.113847723 -0400
@@ -47,21 +47,24 @@
 		NoFrameCheck = 1;
 		
 	NoFrameCheck = 1;
+	out_logfile.open ("log.txt");
 
 #else  /* defined __unix__ */
 
 int main(int argc, char *argv[])
 {
+	char logfile[MAX_PATH];
 	char *home_dir = get_homedir();
 	snprintf(szIniFile, MAX_PATH, "%s/.megamario",
 		home_dir? home_dir:".");
 	check_and_create_dir(szIniFile);
 	snprintf(szIniFile, MAX_PATH, "%s/.megamario/mario.ini",
 		home_dir? home_dir:".");
-
+	snprintf(logfile, MAX_PATH, "%s/.megamario/log.txt",
+		home_dir? home_dir:".");
+	out_logfile.open (logfile);
 #endif /* defined __unix__ */
 
-	out_logfile.open ("log.txt");
 
 	dictionary * d = iniparser_new(szIniFile);
 	pixelation = iniparser_getboolean (d, "Mario:Pixelation", 1);