From 3c45c05eb2195c131b16bc98e3d16b56077199ca Mon Sep 17 00:00:00 2001 From: truelight Date: Thu, 16 Dec 2004 11:12:59 +0000 Subject: [PATCH] (svn r1126) -Fix: [Network] Pressing Disconnect on the GUI puts you back to the main-menu (so you no longer stay ingame (if you were)) --- network_gui.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/network_gui.c b/network_gui.c index e7e803a14c..06216126a9 100644 --- a/network_gui.c +++ b/network_gui.c @@ -1189,6 +1189,8 @@ void ShowClientList() AllocateWindowDesc(&_client_list_desc); } +extern void SwitchMode(int new_mode); + static void NetworkJoinStatusWindowWndProc(Window *w, WindowEvent *e) { switch(e->event) { @@ -1224,8 +1226,9 @@ static void NetworkJoinStatusWindowWndProc(Window *w, WindowEvent *e) switch(e->click.widget) { case 0: case 3: /* Close 'X' | Disconnect button */ NetworkDisconnect(); - ShowNetworkGameWindow(); DeleteWindowById(WC_NETWORK_STATUS_WINDOW, 0); + SwitchMode(SM_MENU); + ShowNetworkGameWindow(); break; } break;