Save games in different directory for debug version to prevent

crashing when opening wrong-format files.
This commit is contained in:
ehouse 2008-10-24 08:36:44 +00:00
parent 7c5b8d25fd
commit 56cc76b913
3 changed files with 16 additions and 8 deletions

View file

@ -2742,7 +2742,7 @@ wince_debugf(const XP_UCHAR* format, ...)
makeTimeStamp(timeStamp, sizeof(timeStamp));
#if defined TARGET_OS_WINCE
logFileName = L"\\My Documents\\Crosswords\\xwDbgLog.txt";
logFileName = L"\\My Documents\\" LCROSSWORDS_DIR L"\\xwDbgLog.txt";
#elif defined TARGET_OS_WIN32
logFileName = L"xwDbgLog.txt";
#endif

View file

@ -30,6 +30,13 @@
#include "cesockwr.h"
#define CE_GAMEFILE_VERSION 0x01 /* means draw gets to save/restore */
#ifdef DEBUG
# define CROSSWORDS_DIR "Cross_dbg"
# define LCROSSWORDS_DIR L"Cross_dbg"
#else
# define CROSSWORDS_DIR "Crosswords"
# define LCROSSWORDS_DIR L"Crosswords"
#endif
#ifdef _WIN32_WCE
typedef enum {

View file

@ -24,18 +24,19 @@
#include "cemain.h"
#ifdef _WIN32_WCE
# define DEFAULT_DIR_NAME L"\\My Documents\\Crosswords"
# define PREFSFILENAME L"\\My Documents\\Crosswords\\xwprefs"
# define UNSAVEDGAMEFILENAME "\\My Documents\\Crosswords\\_newgame"
# define DEFAULT_DIR_NAME L"\\My Documents\\" LCROSSWORDS_DIR
# define PREFSFILENAME L"\\My Documents\\" LCROSSWORDS_DIR L"\\xwprefs"
# define UNSAVEDGAMEFILENAME "\\My Documents\\" CROSSWORDS_DIR "\\_newgame"
#else
# define DEFAULT_DIR_NAME L"\\tmp"
# define PREFSFILENAME L"\\tmp\\xwprefs"
# define UNSAVEDGAMEFILENAME "\\tmp\\_newgame"
# define DEFAULT_DIR_NAME "\\tmp" CROSSWORDS_DIR
# define LDEFAULT_DIR_NAME L"\\tmp" LCROSSWORDS_DIR
# define PREFSFILENAME LDEFAULT_DIR_NAME L"\\xwprefs"
# define UNSAVEDGAMEFILENAME DEFAULT_DIR_NAME "\\_newgame"
#endif
#ifdef _WIN32_WCE
# define DEFAULT_DIR_NAME L"\\My Documents\\Crosswords"
# define DEFAULT_DIR_NAME L"\\My Documents\\" LCROSSWORDS_DIR
/* # define PREFSFILENAME L"\\My Documents\\Crosswords\\xwprefs" */
/* # define UNSAVEDGAMEFILENAME "\\My Documents\\Crosswords\\_newgame" */
#else