shithub: choc

Download patch

ref: 2e3e45cb9b6094d2e8af2a43512f33d813ae454b
parent: ae8b80991ed1ad827b193c0b2552e3ac63a1baa4
author: Simon Howard <fraggle@gmail.com>
date: Thu May 24 10:29:08 EDT 2007

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

--- a/textscreen/txt_desktop.c
+++ b/textscreen/txt_desktop.c
@@ -110,7 +110,7 @@
 {
     free(desktop_title);
     desktop_title = strdup(title);
-    SDL_WM_SetCaption(title, NULL);
+    TXT_SetWindowTitle(title);
 }
 
 void TXT_DrawDesktop(void)
--- a/textscreen/txt_main.c
+++ b/textscreen/txt_main.c
@@ -518,3 +518,8 @@
     key_mapping = enable;
 }
 
+void TXT_SetWindowTitle(char *title)
+{
+    SDL_WM_SetCaption(title, NULL);
+}
+
--- a/textscreen/txt_main.h
+++ b/textscreen/txt_main.h
@@ -109,5 +109,9 @@
 
 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 */