changeset 18577:910ab4eabf35 draft

(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
author rubidium <rubidium@openttd.org>
date Sun, 04 Dec 2011 11:18:43 +0000
parents e5ebf4af8f08
children 569473588496
files src/newgrf_config.h src/openttd.cpp src/table/settings.ini
diffstat 3 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/newgrf_config.h
+++ b/src/newgrf_config.h
@@ -240,5 +240,6 @@
 #endif /* ENABLE_NETWORK */
 
 void UpdateNewGRFScanStatus(uint num, const char *name);
+bool UpdateNewGRFConfigPalette(int32 p1 = 0);
 
 #endif /* NEWGRF_CONFIG_H */
--- a/src/openttd.cpp
+++ b/src/openttd.cpp
@@ -398,6 +398,9 @@
 		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();
--- a/src/table/settings.ini
+++ b/src/table/settings.ini
@@ -40,7 +40,6 @@
 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