summaryrefslogtreecommitdiff
path: root/console.c
diff options
context:
space:
mode:
authordarkvater <darkvater@openttd.org>2004-09-06 21:27:26 +0000
committerdarkvater <darkvater@openttd.org>2004-09-06 21:27:26 +0000
commitbb75f30a7944726f0855e0a9b1e8f2d7a2ead343 (patch)
tree66f087ea3bf4469a6fbb3d8fc8ac817ced60fbcc /console.c
parent78b64ed1925c99ecc4fe26ffb4969b7001e7e095 (diff)
downloadopenttd-bb75f30a7944726f0855e0a9b1e8f2d7a2ead343.tar.xz
(svn r170) -Fix: [1022902] network fix .. console fix bug [1018523]. Fixes some variable initialization errors and a console.h warning (sign_de)
Diffstat (limited to 'console.c')
-rw-r--r--console.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/console.c b/console.c
index 13a163667..35945356a 100644
--- a/console.c
+++ b/console.c
@@ -65,8 +65,8 @@ static void IConsoleWndProc(Window *w, WindowEvent *e)
{
switch(e->event) {
- case WE_PAINT:
-
+ case WE_PAINT:
+
GfxFillRect(w->left,w->top,w->width,w->height-1,0);
{
int i=_iconsole_scroll;
@@ -100,6 +100,11 @@ static void IConsoleWndProc(Window *w, WindowEvent *e)
}
break;
+ case WE_DESTROY:
+ _iconsole_win=NULL;
+ _iconsole_mode=ICONSOLE_CLOSED;
+ break;
+
case WE_KEYPRESS:
e->keypress.cont=false;
if (e->keypress.keycode == (WKC_UP))
@@ -257,7 +262,7 @@ void IConsoleSwitch()
}
void IConsoleClose() {
-if (_iconsole_mode==ICONSOLE_OPENED) IConsoleSwitch();
+if (_iconsole_mode==ICONSOLE_OPENED) IConsoleSwitch();
_iconsole_mode=ICONSOLE_CLOSED;
}
@@ -333,7 +338,7 @@ if (_iconsole_win!=NULL) SetWindowDirty(_iconsole_win);
}
-void IConsolePrintF(byte color_code, const char *s, ...)
+void CDECL IConsolePrintF(byte color_code, const char *s, ...)
{
va_list va;
char buf[1024];