X-Git-Url: http://winboard.nl/cgi-bin?p=xboard.git;a=blobdiff_plain;f=winboard%2Fwinboard.c;h=81aa0fb2015596aab8d0eb25c501ecad53b6e2aa;hp=6452a5b5dbe43e2b2b2a461f3885fd9cf318e66e;hb=36fca099ff6d67b7df504606ffa15e8e5e8c66bb;hpb=3f9d0b4c529fcff1334c0a70f7186fe0a55cabfd diff --git a/winboard/winboard.c b/winboard/winboard.c index 6452a5b..81aa0fb 100644 --- a/winboard/winboard.c +++ b/winboard/winboard.c @@ -879,6 +879,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; @@ -6133,6 +6134,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); @@ -6692,6 +6699,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");