summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarkvater <darkvater@openttd.org>2006-12-06 17:28:14 +0000
committerDarkvater <darkvater@openttd.org>2006-12-06 17:28:14 +0000
commit17eeba3245aaa2df1f39539026b8dcfaaa0fdeb2 (patch)
tree0edc65fa3887e033d6d255bd7aa427f4c557e2f2
parent929a1a5d353534eedc3e5b90640e0f17c005423f (diff)
downloadopenttd-17eeba3245aaa2df1f39539026b8dcfaaa0fdeb2.tar.xz
(svn r7402) -Fix: [FS#255] Long Delay for Message Windows to Appear. Immediately show a new message
if present if no news window is open, or has just been closed instead of waiting for the timer of the current news to time out.
-rw-r--r--news_gui.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/news_gui.c b/news_gui.c
index 05804d9c8..7400ac1e4 100644
--- a/news_gui.c
+++ b/news_gui.c
@@ -471,15 +471,11 @@ static bool ReadyForNextItem(void)
w = FindWindowById(WC_STATUS_BAR, 0);
if (w != NULL && WP(w, const def_d).data_1 > -1280) return false;
- // Newspaper message
- // Wait until duration reaches 0
- if (ni->duration != 0) {
- ni->duration--;
- return false;
- }
+ // Newspaper message, decrement duration counter
+ if (ni->duration != 0) ni->duration--;
// neither newsticker nor newspaper are running
- return true;
+ return (ni->duration == 0 || FindWindowById(WC_NEWS_WINDOW, 0) == NULL);
}
static void MoveToNextItem(void)