1
0
Fork 0

(svn r1022) -Fix: [Network] [ 1083690 ] The password dialog made the network

disconnect without cleaning up.
release/0.4.5
truelight 2004-12-12 13:46:10 +00:00
parent 920a93071b
commit e027fa76b1
3 changed files with 6 additions and 3 deletions

View File

@ -51,6 +51,7 @@ void HandleOnEditTextCancel() {
#ifdef ENABLE_NETWORK #ifdef ENABLE_NETWORK
case 4: case 4:
NetworkDisconnect(); NetworkDisconnect();
ShowNetworkGameWindow();
break; break;
#endif /* ENABLE_NETWORK */ #endif /* ENABLE_NETWORK */
} }
@ -2228,7 +2229,7 @@ static void MainWindowWndProc(Window *w, WindowEvent *e) {
DrawSprite(SPR_OTTD_T, off_x + 34, 50); DrawSprite(SPR_OTTD_T, off_x + 34, 50);
DrawSprite(SPR_OTTD_T, off_x + 65, 50); DrawSprite(SPR_OTTD_T, off_x + 65, 50);
DrawSprite(SPR_OTTD_D, off_x + 96, 50); DrawSprite(SPR_OTTD_D, off_x + 96, 50);
/* /*
DrawSprite(SPR_OTTD_R, off_x + 119, 50); DrawSprite(SPR_OTTD_R, off_x + 119, 50);
DrawSprite(SPR_OTTD_A, off_x + 148, 50); DrawSprite(SPR_OTTD_A, off_x + 148, 50);

View File

@ -791,11 +791,11 @@ press_ok:;
WindowNumber wnd_num = WP(w,querystr_d).wnd_num; WindowNumber wnd_num = WP(w,querystr_d).wnd_num;
Window *parent; Window *parent;
DeleteWindow(w);
// Mask the edit-box as closed, so we don't send out a CANCEL // Mask the edit-box as closed, so we don't send out a CANCEL
closed = true; closed = true;
DeleteWindow(w);
parent = FindWindowById(wnd_class, wnd_num); parent = FindWindowById(wnd_class, wnd_num);
if (parent != NULL) { if (parent != NULL) {
WindowEvent e; WindowEvent e;

View File

@ -896,6 +896,8 @@ void NetworkDisconnect(void)
} }
} }
DeleteWindowById(WC_NETWORK_STATUS_WINDOW, 0);
NetworkClose(); NetworkClose();
// Free all queued commands // Free all queued commands