|
@@ -149,30 +149,32 @@ static void Load_OPTS()
|
|
|
* autosave-frequency stays when joining a network-server */
|
|
|
PrepareOldDiffCustom();
|
|
|
LoadSettings(_gameopt_settings, &_settings_game, _gameopt_sl_compat);
|
|
|
HandleOldDiffCustom(true);
|
|
|
}
|
|
|
|
|
|
static void Load_PATS()
|
|
|
{
|
|
|
/* Copy over default setting since some might not get loaded in
|
|
|
* a networking environment. This ensures for example that the local
|
|
|
* currency setting stays when joining a network-server */
|
|
|
LoadSettings(_settings, &_settings_game, _settings_sl_compat);
|
|
|
}
|
|
|
|
|
|
static void Check_PATS()
|
|
|
{
|
|
|
LoadSettings(_settings, &_load_check_data.settings, _settings_sl_compat);
|
|
|
}
|
|
|
|
|
|
static void Save_PATS()
|
|
|
{
|
|
|
SaveSettings(_settings, &_settings_game);
|
|
|
}
|
|
|
|
|
|
static const ChunkHandler setting_chunk_handlers[] = {
|
|
|
{ 'OPTS', nullptr, Load_OPTS, nullptr, nullptr, CH_READONLY },
|
|
|
{ 'PATS', Save_PATS, Load_PATS, nullptr, Check_PATS, CH_TABLE },
|
|
|
static const ChunkHandler OPTS{ 'OPTS', nullptr, Load_OPTS, nullptr, nullptr, CH_READONLY };
|
|
|
static const ChunkHandler PATS{ 'PATS', Save_PATS, Load_PATS, nullptr, Check_PATS, CH_TABLE };
|
|
|
static const ChunkHandlerRef setting_chunk_handlers[] = {
|
|
|
OPTS,
|
|
|
PATS,
|
|
|
};
|
|
|
|
|
|
extern const ChunkHandlerTable _setting_chunk_handlers(setting_chunk_handlers);
|