ofn.hwndOwner = hDlg;\r
ofn.hInstance = hInst;\r
ofn.lpstrFilter = filter;\r
- ofn.nFilterIndex = 1L + (ext = activeCps ? 0 : activeList[layoutList[(i-2000)/2+1]].max);\r
+ ofn.nFilterIndex = 1L + (ext = activeCps ? 0 : activeList[layoutList[(i-2000)/2+1]].max & 31);\r
ofn.lpstrDefExt = defaultExt[ext];\r
ofn.lpstrFile = buf;\r
ofn.nMaxFile = sizeof(buf);\r
ofn.lpstrTitle = _("Choose File");\r
ofn.Flags = OFN_FILEMUSTEXIST | OFN_LONGNAMES | OFN_HIDEREADONLY;\r
\r
- if( GetOpenFileName( &ofn ) ) {\r
+ if( activeList[layoutList[(i-2000)/2+1]].max & 32 ?\r
+ GetOpenFileName( &ofn ) :\r
+ GetSaveFileName( &ofn ) ) {\r
SetDlgItemText( hDlg, i+3, buf );\r
}\r
} else\r
{ 0, 0, 0, NULL, NULL, NULL, NULL, Label, N_("or specify one below:") },\r
{ 0, 0, 0, NULL, (void*) &nickName, NULL, NULL, TextBox, N_("Nickname (optional):") },\r
{ 0, 0, 0, NULL, (void*) &useNick, NULL, NULL, CheckBox, N_("Use nickname in PGN tag") },\r
- { 0, 0, 3, NULL, (void*) &engineName, NULL, NULL, FileName, N_("Engine (*.exe):") },\r
+ { 0, 0, 32+3, NULL, (void*) &engineName, NULL, NULL, FileName, N_("Engine (*.exe):") },\r
{ 0, 0, 0, NULL, (void*) ¶ms, NULL, NULL, TextBox, N_("command-line parameters:") },\r
{ 0, 0, 0, NULL, (void*) &engineDir, NULL, NULL, PathName, N_("directory:") },\r
{ 95, 0, 0, NULL, NULL, NULL, NULL, Label, N_("(Directory will be derived from engine path when left empty)") },\r
{ 0, 0, 0, NULL, (void*) &appData.roundSync, "", NULL, CheckBox, N_("Sync after round") },\r
{ 0, 1, 1000000000, NULL, (void*) &appData.defaultMatchGames, "", NULL, Spin, N_("Games per Match / Pairing:") },\r
{ 0, 0, 1, NULL, (void*) &appData.saveGameFile, "", NULL, FileName, N_("File for saving tourney games:") },\r
- { 0, 0, 1, NULL, (void*) &appData.loadGameFile, "", NULL, FileName, N_("Game File with Opening Lines:") },\r
+ { 0, 0, 32+1, NULL, (void*) &appData.loadGameFile, "", NULL, FileName, N_("Game File with Opening Lines:") },\r
{ 0, -2, 1000000000, NULL, (void*) &appData.loadGameIndex, "", NULL, Spin, N_("Game Number:") },\r
- { 0, 0, 2, NULL, (void*) &appData.loadPositionFile, "", NULL, FileName, N_("File with Start Positions:") },\r
+ { 0, 0, 32+2, NULL, (void*) &appData.loadPositionFile, "", NULL, FileName, N_("File with Start Positions:") },\r
{ 0, -2, 1000000000, NULL, (void*) &appData.loadPositionIndex, "", NULL, Spin, N_("Position Number:") },\r
{ 0, 0, 0, NULL, (void*) &autoinc, "", NULL, CheckBox, N_("Step through lines/positions in file") },\r
{ 0, 0, 1000000000, NULL, (void*) &appData.rewindIndex, "", NULL, Spin, N_("Rewind after (0 = never):") },\r
}\r
SendMessage(hwndCombo, CB_SELECTSTRING, (WPARAM) 0, (LPARAM) buf);\r
return 0;\r
+\r
}\r
\r
void TourneyPopup(HWND hwnd)\r