Permalink
Browse files

Fixed screenshot save directory on OSX.

  • Loading branch information...
ko2fan committed Jun 3, 2007
1 parent 778ca33 commit c64ac878ee8cf33527abad76fc6bad546d49a2a8
Showing with 8 additions and 2 deletions.
  1. +4 −0 ChangeLog
  2. +2 −0 src/game.cpp
  3. +2 −2 src/main.cpp
View
@@ -1,3 +1,7 @@
+2007-06-03 David Athay <ko2fan@gmail.com>
+
+ * src/main.cpp, src/game.cpp: Fixed screenshot taking on OSX.
+
2007-06-03 Bjørn Lindeijer <bjorn@lindeijer.nl>
* src/CMakeLists.txt, src/Makefile.am, docs/Makefile.am: Added some
View
@@ -320,6 +320,8 @@ bool saveScreenshot(SDL_Surface *screenshot)
filename.str("");
#if (defined __USE_UNIX98 || defined __FreeBSD__)
filename << PHYSFS_getUserDir() << ".tmw/";
+#elif defined __APPLE__
+ filename << PHYSFS_getUserDir() << "Desktop/";
#endif
filename << "TMW_Screenshot_" << screenshotCount << ".png";
testExists.open(filename.str().c_str(), std::ios::in);
View
@@ -36,7 +36,7 @@
#include <libxml/parser.h>
-#if (defined __USE_UNIX98 || defined __FreeBSD__ || defined __APPLE__)
+#ifndef WIN32
#include <cerrno>
#include <sys/stat.h>
#endif
@@ -150,7 +150,7 @@ void init_engine(const Options &options)
<< std::endl;
exit(1);
}
-
+
// Set log file
logger->setLogFile(homeDir + std::string("/tmw.log"));

0 comments on commit c64ac87

Please sign in to comment.