if (wname != NULL) {
MarkMenuItem(wname, True);
}
- oldmode = gameMode;
+ if(oldMode == TwoMachinesPlay) EnableNamedMenuItem("Mode.MachineMatch", True);
MarkMenuItem("Mode.MachineMatch", matchMode && matchGame < appData.matchGames);
+ oldmode = gameMode;
/* Maybe all the enables should be handled here, not just this one */
EnableNamedMenuItem("Mode.Training", gameMode == Training || gameMode == PlayFromGameFile);
void
MatchProc ()
{
+ static Enables matchOff[] = { { "Mode.MachineMatch", False }, { NULL, False } };
+ if(matchMode) SetMenuEnables(matchOff);
MatchEvent(2);
}
break;\r
\r
case IDM_Match: // [HGM] match: flows into next case, after setting Match Mode and nr of Games\r
+ if(matchMode) EnableMenuItem(GetMenu(hwndMain), IDM_Match, MF_BYCOMMAND|MF_GRAYED);\r
MatchEvent(2); // distinguish from command-line-triggered case (matchMode=1)\r
break;\r
\r
nowChecked = 0;\r
break;\r
}\r
+ if(prevChecked == IDM_TwoMachine) // [HGM] 'Machine Match' might have gotten disabled when stopping match\r
+ EnableMenuItem(GetMenu(hwndMain), IDM_Match, MF_BYCOMMAND|MF_ENABLED)\r
CheckMark(prevChecked, MF_UNCHECKED);\r
CheckMark(nowChecked, MF_CHECKED);\r
CheckMark(IDM_Match, matchMode && matchGame < appData.matchGames ? MF_CHECKED : MF_UNCHECKED);\r
if (wname != NULL) {
MarkMenuItem(wname, True);
}
- oldmode = gameMode;
+ if(oldMode == TwoMachinesPlay) EnableNamedMenuItem("Mode.MachineMatch", True);
MarkMenuItem("Mode.MachineMatch", matchMode && matchGame < appData.matchGames);
+ oldmode = gameMode;
/* Maybe all the enables should be handled here, not just this one */
EnableNamedMenuItem("Mode.Training", gameMode == Training || gameMode == PlayFromGameFile);