From 5cf5345eb1ec9c035ad3d8c51da225f0e606a132 Mon Sep 17 00:00:00 2001 From: ehouse Date: Mon, 28 Dec 2009 00:18:52 +0000 Subject: [PATCH] Set addrChanged on role change even if conns dlg not used: fixes bug where freshly installed device fails to connect. --- xwords4/wince/ceginfo.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/xwords4/wince/ceginfo.c b/xwords4/wince/ceginfo.c index 1a31031d9..cf63a42aa 100755 --- a/xwords4/wince/ceginfo.c +++ b/xwords4/wince/ceginfo.c @@ -366,6 +366,10 @@ handleConnOptionsButton( GameInfoState* state ) role = (DeviceRole)SendDlgItemMessage( hDlg, state->roleComboId, GETCURSEL(globals), 0, 0L); value.ng_role = state->curRole = role; + if ( value.ng_role != globals->gameInfo.serverRole ) { + state->results.addrChanged = XP_TRUE; + } + newg_attrChanged( state->newGameCtx, NG_ATTR_ROLE, value ); raiseForRoleChange( state, role ); } /* handleConnOptionsButton */ @@ -768,10 +772,7 @@ GameInfo( HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam ) break; case IDOK: { - DeviceRole role = (DeviceRole) - SendDlgItemMessage( hDlg, state->roleComboId, - GETCURSEL(globals), 0, 0L ); - if ( role != SERVER_STANDALONE + if ( state->curRole != SERVER_STANDALONE && !comms_checkComplete( &state->prefsPrefs->addrRec ) && !callConnsDlg( state ) ) {