X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=winboard%2Fwsettings.c;h=521ce78ca993a9ce6a0c7a382bdd2c7bdd6a138e;hb=24659044481fa42b3846cb9e801fd06abe0a102e;hp=893d91b47ae737df3e1581c4435887c8cf4ee82c;hpb=4b2e076784b6bfd57781000e1ec809a1dc7ba4a1;p=xboard.git diff --git a/winboard/wsettings.c b/winboard/wsettings.c index 893d91b..521ce78 100644 --- a/winboard/wsettings.c +++ b/winboard/wsettings.c @@ -541,6 +541,12 @@ LRESULT CALLBACK SettingsProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lPa GetOptionValues(hDlg, activeCps, activeList); else if( activeList[j].type != Button) break; else if( !activeCps ) { (*(ButtonCallback*) activeList[j].target)(hDlg); break; } + if(j == 0) { // WinBoard save button + SaveEngineSettings(activeCps == &second); + EndDialog( hDlg, 0 ); + comboCallback = NULL; activeCps = NULL; settingsDlg = NULL; + return TRUE; + } snprintf(buf, MSG_SIZ, "option %s\n", activeList[j].name); SendToProgram(buf, activeCps); }