diff options
author | 2018-10-05 01:13:05 +0200 | |
---|---|---|
committer | 2018-10-05 01:20:04 +0200 | |
commit | f522870d8acf3e12ab0845272844561d9195fe4d (patch) | |
tree | 46ebc8a6926af06ce89bd9308537a8eeb2fdf610 /src/lib/util/options.h | |
parent | 99574efebe6c62ac7b4fda4080174dd91ac821ff (diff) |
-options: Restored erroneously-removed game-specific INI option reversion between runs. Fixes MT#06171. [Ryan Holtz]
Diffstat (limited to 'src/lib/util/options.h')
-rw-r--r-- | src/lib/util/options.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lib/util/options.h b/src/lib/util/options.h index d0cb6e5c29f..74fec7b0a90 100644 --- a/src/lib/util/options.h +++ b/src/lib/util/options.h @@ -130,6 +130,7 @@ public: virtual void set_default_value(std::string &&newvalue); void set_description(const char *description) { m_description = description; } void set_value_changed_handler(std::function<void(const char *)> &&handler) { m_value_changed_handler = std::move(handler); } + virtual void revert(int priority_hi, int priority_lo) { } protected: virtual void internal_set_value(std::string &&newvalue) = 0; @@ -171,6 +172,7 @@ public: void set_description(const char *name, const char *description); void remove_entry(entry &delentry); void set_value_changed_handler(const std::string &name, std::function<void(const char *)> &&handler); + void revert(int priority_hi = OPTION_PRIORITY_MAXIMUM, int priority_lo = OPTION_PRIORITY_DEFAULT); // parsing/input void parse_command_line(const std::vector<std::string> &args, int priority, bool ignore_unknown_options = false); @@ -217,6 +219,7 @@ private: virtual const char *minimum() const override; virtual const char *maximum() const override; virtual const std::string &default_value() const override; + virtual void revert(int priority_hi, int priority_lo) override; virtual void set_default_value(std::string &&newvalue) override; |