slackbuilds_ponce/games/megamario/patches/logfile.diff
B. Watson 40ba4e09f4 games/megamario: Added (Super Mario Brothers clone).
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
2016-08-15 00:50:09 +01:00

30 lines
896 B
Diff

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);