From 2e3e45cb9b6094d2e8af2a43512f33d813ae454b Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Thu, 24 May 2007 14:29:08 +0000 Subject: Add TXT_SetWindowTitle function to wrap SDL_WM_SetCaption, so that txt_desktop.c doesn't need to call SDL functions directly. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 885 --- textscreen/txt_desktop.c | 2 +- textscreen/txt_main.c | 5 +++++ textscreen/txt_main.h | 4 ++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/textscreen/txt_desktop.c b/textscreen/txt_desktop.c index b17f1514..ee6c1671 100644 --- a/textscreen/txt_desktop.c +++ b/textscreen/txt_desktop.c @@ -110,7 +110,7 @@ void TXT_SetDesktopTitle(char *title) { free(desktop_title); desktop_title = strdup(title); - SDL_WM_SetCaption(title, NULL); + TXT_SetWindowTitle(title); } void TXT_DrawDesktop(void) diff --git a/textscreen/txt_main.c b/textscreen/txt_main.c index edccd704..f184ce0f 100644 --- a/textscreen/txt_main.c +++ b/textscreen/txt_main.c @@ -518,3 +518,8 @@ void TXT_EnableKeyMapping(int enable) key_mapping = enable; } +void TXT_SetWindowTitle(char *title) +{ + SDL_WM_SetCaption(title, NULL); +} + diff --git a/textscreen/txt_main.h b/textscreen/txt_main.h index c6a9cc72..13c38537 100644 --- a/textscreen/txt_main.h +++ b/textscreen/txt_main.h @@ -109,5 +109,9 @@ void TXT_Sleep(int timeout); void TXT_EnableKeyMapping(int enable); +// Set the window title of the window containing the text mode screen + +void TXT_SetWindowTitle(char *title); + #endif /* #ifndef TXT_MAIN_H */ -- cgit v1.2.3