Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from Dec 13, 2020

Conversation

TrueBrain
Copy link
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
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 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.

None yet

2 participants