diff options
author | darkvater <darkvater@openttd.org> | 2005-01-13 20:46:39 +0000 |
---|---|---|
committer | darkvater <darkvater@openttd.org> | 2005-01-13 20:46:39 +0000 |
commit | 352cf002b26013f79d16d2d3afa2ab8d3f5eb0d9 (patch) | |
tree | 14f7f4b3f73aae4e412e55b6ad6dc42d9ff4dbf2 | |
parent | 7dddb6cf7aa1d6a89ddd9868a11f625849a7a192 (diff) | |
download | openttd-352cf002b26013f79d16d2d3afa2ab8d3f5eb0d9.tar.xz |
(svn r1502) -Fix: [1101889] Crash under windows... stupid typo in player_gui.c ^ should've been &
-Fix: in multiplayer clientlist can only be opened once
-rw-r--r-- | main_gui.c | 2 | ||||
-rw-r--r-- | network_gui.c | 6 | ||||
-rw-r--r-- | player_gui.c | 2 |
3 files changed, 6 insertions, 4 deletions
diff --git a/main_gui.c b/main_gui.c index 023a645a3..783762b43 100644 --- a/main_gui.c +++ b/main_gui.c @@ -251,7 +251,7 @@ static void MenuClickFinances(int index) } #ifdef ENABLE_NETWORK -extern void ShowClientList(); +extern void ShowClientList(void); #endif /* ENABLE_NETWORK */ static void MenuClickCompany(int index) diff --git a/network_gui.c b/network_gui.c index 5a3b39eb7..fabb9f733 100644 --- a/network_gui.c +++ b/network_gui.c @@ -1255,9 +1255,11 @@ static void ClientListWndProc(Window *w, WindowEvent *e) } } -void ShowClientList() +void ShowClientList(void) { - AllocateWindowDesc(&_client_list_desc); + Window *w = AllocateWindowDescFront(&_client_list_desc, 0); + if (w) + w->window_number = 0; } extern void SwitchMode(int new_mode); diff --git a/player_gui.c b/player_gui.c index da4e2eaa5..bb5606c95 100644 --- a/player_gui.c +++ b/player_gui.c @@ -163,7 +163,7 @@ static void PlayerFinancesWndProc(Window *w, WindowEvent *e) bool stickied = !!(w->flags4 & WF_STICKY); int player = w->window_number; DeleteWindow(w); - DoShowPlayerFinances(player, mode^1, stickied); + DoShowPlayerFinances(player, !HASBIT(mode, 0), stickied); } break; case 6: /* increase loan */ |