From 1f5440f27d86d4cad414fffa6224bb1eadd191a4 Mon Sep 17 00:00:00 2001 From: gewlitys Date: Mon, 10 Feb 2003 21:26:09 +0000 Subject: [PATCH] do_subtitles doesn't abort anymore when using --nosubtitles. fixes #132 git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@729 8092fc87-c524-0410-9efc-e669fe64eaf9 --- sc2/src/sc2code/comm.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/sc2/src/sc2code/comm.c b/sc2/src/sc2code/comm.c index 5da6d3bd4..de3fae566 100644 --- a/sc2/src/sc2code/comm.c +++ b/sc2/src/sc2code/comm.c @@ -1972,9 +1972,6 @@ int do_subtitles (UNICODE *pStr) { static UNICODE *last_page = NULL;; - // TODO: proper disabling of subtitles, this one prolly isn't 'safe' - if (optSubtitles == FALSE) - return 0; if (pStr == 0) return (subtitle_state = DONE_SUBTITLE); @@ -1998,8 +1995,15 @@ do_subtitles (UNICODE *pStr) { TEXT t; CONTEXT OldContext; - - CommData.AlienTextTemplate.pStr = pStr; + + if (optSubtitles) + { + CommData.AlienTextTemplate.pStr = pStr; + } + else + { + CommData.AlienTextTemplate.pStr = ""; + } t = CommData.AlienTextTemplate; OldContext = SetContext (TaskContext);