summaryrefslogtreecommitdiff
path: root/src/newgrf_gui.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2011-08-24 12:18:53 +0000
committerrubidium <rubidium@openttd.org>2011-08-24 12:18:53 +0000
commit70179db81e5a7fff78b558de9f39521c44a16886 (patch)
treea5c98947d09effd5e5005211b82c18769e4845b3 /src/newgrf_gui.cpp
parent38ad276acc6f108162c4255b837d4c450b91f23d (diff)
downloadopenttd-70179db81e5a7fff78b558de9f39521c44a16886.tar.xz
(svn r22820) -Codechange: perform a full (re)draw cycle in the first draw during progress instead of waiting 200ms
Diffstat (limited to 'src/newgrf_gui.cpp')
-rw-r--r--src/newgrf_gui.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/newgrf_gui.cpp b/src/newgrf_gui.cpp
index 8fcc38c7c..ca1d13f33 100644
--- a/src/newgrf_gui.cpp
+++ b/src/newgrf_gui.cpp
@@ -1787,7 +1787,13 @@ struct ScanProgressWindow : public Window {
void UpdateNewGRFScanStatus(uint num, const char *name)
{
free(this->last_name);
- this->last_name = strdup(name);
+ if (name == NULL) {
+ char buf[256];
+ GetString(buf, STR_NEWGRF_SCAN_ARCHIVES, lastof(buf));
+ this->last_name = strdup(buf);
+ } else {
+ this->last_name = strdup(name);
+ }
this->scanned = num;
if (num > _settings_client.gui.last_newgrf_count) _settings_client.gui.last_newgrf_count = num;