summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2011-12-04 11:18:43 +0000
committerrubidium <rubidium@openttd.org>2011-12-04 11:18:43 +0000
commit5891099f24c7cb1a1d0165774ed839164f8674fd (patch)
tree108988369df86538c3520edb197406da18813fb8 /src
parent87fdac852c4d112d9726855ff98c978dd59f76fa (diff)
downloadopenttd-5891099f24c7cb1a1d0165774ed839164f8674fd.tar.xz
(svn r23422) -Fix [FS#4863] (r22797): the default palette setting wasn't applied correctly anymore as the configuration file is loaded after the first NewGRF scan
Diffstat (limited to 'src')
-rw-r--r--src/newgrf_config.h1
-rw-r--r--src/openttd.cpp3
-rw-r--r--src/table/settings.ini1
3 files changed, 4 insertions, 1 deletions
diff --git a/src/newgrf_config.h b/src/newgrf_config.h
index 94b9a25ce..4e2057fca 100644
--- a/src/newgrf_config.h
+++ b/src/newgrf_config.h
@@ -240,5 +240,6 @@ GRFTextWrapper *FindUnknownGRFName(uint32 grfid, uint8 *md5sum, bool create);
#endif /* ENABLE_NETWORK */
void UpdateNewGRFScanStatus(uint num, const char *name);
+bool UpdateNewGRFConfigPalette(int32 p1 = 0);
#endif /* NEWGRF_CONFIG_H */
diff --git a/src/openttd.cpp b/src/openttd.cpp
index 2ec5cea65..dd93ffc68 100644
--- a/src/openttd.cpp
+++ b/src/openttd.cpp
@@ -398,6 +398,9 @@ struct AfterNewGRFScan : NewGRFScanCallback {
uint last_newgrf_count = _settings_client.gui.last_newgrf_count;
LoadFromConfig();
_settings_client.gui.last_newgrf_count = last_newgrf_count;
+ /* Since the default for the palette might have changed due to
+ * reading the configuration file, recalculate that now. */
+ UpdateNewGRFConfigPalette();
AI::Uninitialize(true);
CheckConfig();
diff --git a/src/table/settings.ini b/src/table/settings.ini
index 965eaeb17..40052828b 100644
--- a/src/table/settings.ini
+++ b/src/table/settings.ini
@@ -40,7 +40,6 @@ static bool InvalidateIndustryViewWindow(int32 p1);
static bool InvalidateAISettingsWindow(int32 p1);
static bool RedrawTownAuthority(int32 p1);
static bool InvalidateCompanyInfrastructureWindow(int32 p1);
-extern bool UpdateNewGRFConfigPalette(int32 p1);
static bool ZoomMinMaxChanged(int32 p1);
#ifdef ENABLE_NETWORK