Save programStartTime in settings file rather than save time
[xboard.git] / args.h
diff --git a/args.h b/args.h
index 55fdc07..85e8765 100644 (file)
--- a/args.h
+++ b/args.h
@@ -100,7 +100,7 @@ typedef struct {
 } IcsTextMenuEntry;
 
 IcsTextMenuEntry icsTextMenuEntry[ICS_TEXT_MENU_SIZE];
-char dataDir[MSG_SIZ] = DATADIR, manDir[MSG_SIZ] = MANDIR;
+char dataDir[MSG_SIZ] = DATADIR;
 
 int junk;
 int saveDate;
@@ -224,6 +224,7 @@ ArgDescriptor argDescriptors[] = {
   { "pieceImageDirectory", ArgFilename, (void *) &appData.pieceDirectory, TRUE, (ArgIniType) "" },
   { "pid", ArgFilename, (void *) &appData.pieceDirectory, FALSE, INVALID },
   { "trueColors", ArgBoolean, (void *) &appData.trueColors, TRUE, (ArgIniType) FALSE },
+  { "jewelled", ArgInt, (void *) &appData.jewelled, FALSE, (ArgIniType) -1 },
   { "soundDirectory", ArgFilename, (void *) &appData.soundDirectory, XBOARD, (ArgIniType) "" },
   { "msLoginDelay", ArgInt, (void *) &appData.msLoginDelay, XBOARD, (ArgIniType) MS_LOGIN_DELAY },
   { "pasteSelection", ArgBoolean, (void *) &appData.pasteSelection, XBOARD, (ArgIniType) FALSE },
@@ -712,6 +713,11 @@ ArgDescriptor argDescriptors[] = {
   { "firstDrawDepth", ArgInt, (void *) &appData.drawDepth[0], FALSE, (ArgIniType) 0 },
   { "secondDrawDepth", ArgInt, (void *) &appData.drawDepth[1], FALSE, (ArgIniType) 0 },
   { "memoHeaders", ArgBoolean, (void *) &appData.headers, TRUE, (ArgIniType) FALSE },
+  { "startupMessage", ArgString, (void *) &appData.message, FALSE, (ArgIniType) "" },
+  { "messageSuppress", ArgString, (void *) &appData.suppress, XBOARD, (ArgIniType) "" },
+  { "fen", ArgString, (void *) &appData.fen, FALSE, (ArgIniType) "" },
+  { "men", ArgString, (void *) &appData.men, FALSE, (ArgIniType) "" },
+  { "analysisBell", ArgInt, (void *) &appData.analysisBell, TRUE, (ArgIniType) 0 },
 
 #if ZIPPY
   { "zippyTalk", ArgBoolean, (void *) &appData.zippyTalk, FALSE, (ArgIniType) ZIPPY_TALK },
@@ -1411,7 +1417,11 @@ InitAppData(char *lpCmdLine)
      appData.NrRanks > BOARD_RANKS   )
       DisplayFatalError("Recompile with BOARD_RANKS or BOARD_FILES, to support this size", 0, 2);
 
-  if(!*appData.secondChessProgram) { ASSIGN(appData.secondChessProgram, appData.firstChessProgram); } // [HGM] scp defaults to fcp
+  if(!*appData.secondChessProgram) { // [HGM] scp defaults to fcp
+    ASSIGN(appData.secondChessProgram, appData.firstChessProgram);
+    ASSIGN(appData.secondDirectory, appData.firstDirectory);
+    appData.secondIsUCI = appData.firstIsUCI; // copy type too!
+  }
 
   /* [HGM] After parsing the options from the .ini file, and overruling them
    * with options from the command line, we now make an even higher priority
@@ -1520,11 +1530,10 @@ SaveSettings(char* name)
   ArgDescriptor *ad;
   char dir[MSG_SIZ], buf[MSG_SIZ];
   int mps = appData.movesPerSession;
-  TimeMark now;
 
   if (!MainWindowUp() && !autoClose) return;
 
-  GetTimeMark(&now); saveDate = now.sec;
+  saveDate = programStartTime.sec;
 
   GetCurrentDirectory(MSG_SIZ, dir);
   if(MySearchPath(installDir, name, buf)) {