Add: save openttd.cfg immediately on changing a setting (#8358)
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.
This commit is contained in:
@@ -51,6 +51,7 @@ enum DisplayOptions {
|
||||
extern GameMode _game_mode;
|
||||
extern SwitchMode _switch_mode;
|
||||
extern bool _exit_game;
|
||||
extern bool _save_config;
|
||||
|
||||
/** Modes of pausing we've got */
|
||||
enum PauseMode : byte {
|
||||
|
Reference in New Issue
Block a user