(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

pull/155/head
rubidium 13 years ago
parent 6baa785b5f
commit b92c6ae0b7

@ -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 */

@ -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();

@ -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

Loading…
Cancel
Save