Skip to content

Add: save openttd.cfg immediately on changing a setting#8358

Merged
TrueBrain merged 1 commit intoOpenTTD:masterfrom
TrueBrain:save_config_more_often
Dec 13, 2020
Merged

Add: save openttd.cfg immediately on changing a setting#8358
TrueBrain merged 1 commit intoOpenTTD:masterfrom
TrueBrain:save_config_more_often

Conversation

@TrueBrain
Copy link
Copy Markdown
Member

Formally it was only done on exit. This means that if it crashes
changes in settings were not stored. This is often rather
frustrating. Additionally, targets (like emscripten) where people
are unlike to use "Exit Game", will never see their configuration
stored.

The drawback is that on every setting change there is some minor
I/O of writing the ini file to disk again.

@frosch123
Copy link
Copy Markdown
Member

frosch123 commented Dec 13, 2020

There is a command line option "-x = Do not automatically save to config file on exit". I would have expected that to somehow affect this.

Formally it was only done on exit. This means that if it crashes
changes in settings were not stored. This is often rather
frustrating. Additionally, targets (like emscripten) where people
are unlike to use "Exit Game", will never see their configuration
stored.

The drawback is that on every setting change there is some minor
I/O of writing the ini file to disk again.
@TrueBrain TrueBrain force-pushed the save_config_more_often branch from 6b40f56 to 5016e6e Compare December 13, 2020 15:15
@TrueBrain TrueBrain merged commit c66bd18 into OpenTTD:master Dec 13, 2020
@TrueBrain TrueBrain deleted the save_config_more_often branch December 13, 2020 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants