X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=winboard%2Fwinboard.c;h=bbd8563add2b30379186c6d2f08094391ebfbb45;hb=bf368bef696bee3555a370ac8ff88418e1f5c498;hp=4cb6ef44c8ac7a416a56be34e67ca92a7d4a930f;hpb=18fc21bfe47cf80d294fffc22eb00d7f4384cd62;p=xboard.git diff --git a/winboard/winboard.c b/winboard/winboard.c index 4cb6ef4..bbd8563 100644 --- a/winboard/winboard.c +++ b/winboard/winboard.c @@ -225,7 +225,11 @@ static struct { int x; int y; int mode; } backTextureSquareInfo[BOARD_SIZE][BOAR #if __GNUC__ && !defined(_winmajor) #define oldDialog 0 /* cygwin doesn't define _winmajor; mingw does */ #else +#if defined(_winmajor) #define oldDialog (_winmajor < 4) +#else +#define oldDialog 0 +#endif #endif char *defaultTextAttribs[] = @@ -497,6 +501,7 @@ static int fromX = -1, fromY = -1, toX, toY; // [HGM] moved upstream, so JAWS ca #include "jaws.c" #else #define JAWS_INIT +#define JAWS_ARGS #define JAWS_ALT_INTERCEPT #define JAWS_KB_NAVIGATION #define JAWS_MENU_ITEMS @@ -878,6 +883,7 @@ InitInstance(HINSTANCE hInstance, int nCmdShow, LPSTR lpCmdLine) ShowWindow(hwndConsole, nCmdShow); } if(!appData.noGUI) UpdateWindow(hwnd); else ShowWindow(hwnd, SW_MINIMIZE); + if(gameListDialog) SetFocus(gameListDialog); // [HGM] jaws: for if we clicked multi-game game file return TRUE; @@ -919,6 +925,7 @@ ArgDescriptor argDescriptors[] = { { "loadGameFile", ArgFilename, (LPVOID) &appData.loadGameFile, FALSE }, { "", ArgNone, NULL }, /* keyword arguments */ + JAWS_ARGS { "whitePieceColor", ArgColor, (LPVOID) &whitePieceColor, TRUE }, { "wpc", ArgColor, (LPVOID) &whitePieceColor, FALSE }, { "blackPieceColor", ArgColor, (LPVOID) &blackPieceColor, TRUE }, @@ -1332,6 +1339,7 @@ ArgDescriptor argDescriptors[] = { { "secondNeedsNoncompliantFEN", ArgString, (LPVOID) &appData.fenOverride2, FALSE }, { "keepAlive", ArgInt, (LPVOID) &appData.keepAlive, FALSE }, { "icstype", ArgInt, (LPVOID) &ics_type, FALSE }, + { "forceIllegalMoves", ArgTrue, (LPVOID) &appData.forceIllegal, FALSE }, #ifdef ZIPPY { "zippyTalk", ArgBoolean, (LPVOID) &appData.zippyTalk, FALSE }, @@ -6131,6 +6139,12 @@ WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) DrawPosition(FALSE, NULL); break; + case IDM_MuteSounds: + mute = !mute; // [HGM] mute: keep track of global muting variable + CheckMenuItem(GetMenu(hwndMain),IDM_MuteSounds, + MF_BYCOMMAND|(mute?MF_CHECKED:MF_UNCHECKED)); + break; + case IDM_GeneralOptions: GeneralOptionsPopup(hwnd); DrawPosition(TRUE, NULL); @@ -6690,6 +6704,7 @@ MyPlaySound(MySound *ms) { BOOLEAN ok = FALSE; + if(mute) return TRUE; // [HGM] mute: suppress all sound play when muted switch (ms->name[0]) { case NULLCHAR: if(appData.debugMode) fprintf(debugFP, "silence\n"); @@ -9408,6 +9423,7 @@ static GLT_Item GLT_ItemInfo[] = { { GLT_TIME_CONTROL,"Time Control" }, { GLT_VARIANT, "Variant" }, { GLT_OUT_OF_BOOK,PGN_OUT_OF_BOOK }, + { GLT_RESULT_COMMENT, "Result Comment" }, // [HGM] rescom { 0, 0 } }; @@ -9869,6 +9885,7 @@ ScheduleDelayedEvent(DelayedEventCallback cb, long millisec) } KillTimer(hwndMain, delayedTimerEvent); delayedTimerEvent = 0; + if(delayedTimerCallback != cb) // [HGM] alive: do not "flush" same event, just postpone it delayedTimerCallback(); } delayedTimerCallback = cb;