Don't re-open conns dlg if in standalone mode

This commit is contained in:
ehouse 2009-09-07 16:55:54 +00:00
parent 13e50dd149
commit 4e8d340304

View file

@ -725,12 +725,19 @@ GameInfo(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
handlePrefsButton( hDlg, globals, state );
break;
case IDOK:
if ( !state->connsComplete && !callConnsDlg( state ) ) {
case IDOK: {
DeviceRole role = (DeviceRole)
SendDlgItemMessage( hDlg, state->roleComboId,
GETCURSEL(globals), 0, 0L );
if ( role != SERVER_STANDALONE
&& !state->connsComplete
&& !callConnsDlg( state ) ) {
break;
} else if ( !stateToGameInfo( state ) ) {
break;
}
}
/* FALLTHRU */
case IDCANCEL:
EndDialog(hDlg, id);
state->userCancelled = id == IDCANCEL;