From 4e8d340304242374ec49d1276131108d67a1b698 Mon Sep 17 00:00:00 2001
From: ehouse <ehouse@0782aaa5-4710-0410-8820-a96bf9123855>
Date: Mon, 7 Sep 2009 16:55:54 +0000
Subject: [PATCH] Don't re-open conns dlg if in standalone mode

---
 xwords4/wince/ceginfo.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/xwords4/wince/ceginfo.c b/xwords4/wince/ceginfo.c
index 4fda30cdb..329083580 100755
--- a/xwords4/wince/ceginfo.c
+++ b/xwords4/wince/ceginfo.c
@@ -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;