diff options
author | Darkvater <Darkvater@openttd.org> | 2006-11-18 17:07:05 +0000 |
---|---|---|
committer | Darkvater <Darkvater@openttd.org> | 2006-11-18 17:07:05 +0000 |
commit | e9905dec8021417faef8ab389d0df2a4e28beb9c (patch) | |
tree | bc1b2ebf6db264a4a866ee24f611cd7053bdbc03 /console.c | |
parent | 22ab60c9cbeaabe69e387086fc14261da143bd81 (diff) | |
download | openttd-e9905dec8021417faef8ab389d0df2a4e28beb9c.tar.xz |
(svn r7207) -Codechange: Pass the (unchanged) windowpointer to the console window and do it only once.
Diffstat (limited to 'console.c')
-rw-r--r-- | console.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -152,7 +152,7 @@ static void IConsoleWndProc(Window *w, WindowEvent *e) break; case WKC_CTRL | WKC_RETURN: _iconsole_mode = (_iconsole_mode == ICONSOLE_FULL) ? ICONSOLE_OPENED : ICONSOLE_FULL; - IConsoleResize(); + IConsoleResize(w); MarkWholeScreenDirty(); break; case (WKC_CTRL | 'V'): @@ -283,9 +283,9 @@ void IConsoleFree(void) CloseConsoleLogIfActive(); } -void IConsoleResize(void) +void IConsoleResize(Window *w) { - _iconsole_win = FindWindowById(WC_CONSOLE, 0); + assert(_iconsole_win == w); switch (_iconsole_mode) { case ICONSOLE_OPENED: |