summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2004-12-16 11:12:59 +0000
committertruelight <truelight@openttd.org>2004-12-16 11:12:59 +0000
commit693d074d76cca949cd884d68050c764994be0ddb (patch)
treefecc3896d3feb08fd9a335aed6c0b3f1b8735071
parentc5770907ac04806d8f5632424ccdea2e1b68a1d1 (diff)
downloadopenttd-693d074d76cca949cd884d68050c764994be0ddb.tar.xz
(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))
-rw-r--r--network_gui.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/network_gui.c b/network_gui.c
index e7e803a14..06216126a 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;