diff options
author | Vas Crabb <vas@vastheman.com> | 2020-09-02 17:29:21 +1000 |
---|---|---|
committer | Vas Crabb <vas@vastheman.com> | 2020-09-02 17:41:34 +1000 |
commit | 9445f1d8311db820dc0984e85c9c1450ce1807cd (patch) | |
tree | 43ecc4e298615b8b8388dbe9df4440b53f461b32 /src/frontend/mame/ui/ui.h | |
parent | 654b118ff985a4011bc0caf5ce8160fa80c4b9bf (diff) |
frontend: Added option to skip repeated imperfect emulation warnings.
The option is called skip_warnings, and it must be set in ui.ini (it can
be set using the internal UI). Red warnings cannot be skipped; yellow
warning can be skipped under certain circumstances.
For a yellow warning to be skipped, the system must have been launched
in a way that allows warnings to be displayed, in a configuration with
the same set of devices flagged with unemulated/imperfect features,
within the last seven days, and the warning must have been displayed
within the past 14 days.
Also fixed a bug with display of the MACHINE_NO_COCKTAIL flag in the
internal UI, and increased the size of XML integer attributes to 64
bits.
Diffstat (limited to 'src/frontend/mame/ui/ui.h')
-rw-r--r-- | src/frontend/mame/ui/ui.h | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/src/frontend/mame/ui/ui.h b/src/frontend/mame/ui/ui.h index d62b8b15d1a..8c0504464d3 100644 --- a/src/frontend/mame/ui/ui.h +++ b/src/frontend/mame/ui/ui.h @@ -21,14 +21,21 @@ #include "ui/slider.h" #include "ui/text.h" +#include <ctime> #include <functional> +#include <set> +#include <utility> #include <vector> + namespace ui { + class menu_item; class machine_info; + } // namespace ui + /*************************************************************************** CONSTANTS ***************************************************************************/ @@ -260,9 +267,12 @@ public: virtual void menu_reset() override; private: + using handler_callback_func = std::function<uint32_t (render_container &)>; + using device_feature_set = std::set<std::pair<std::string, std::string> >; + // instance variables render_font * m_font; - std::function<uint32_t (render_container &)> m_handler_callback; + handler_callback_func m_handler_callback; ui_callback_type m_handler_callback_type; uint32_t m_handler_param; bool m_single_step; @@ -270,7 +280,7 @@ private: osd_ticks_t m_showfps_end; bool m_show_profiler; osd_ticks_t m_popup_text_end; - std::unique_ptr<uint8_t[]> m_non_char_keys_down; + std::unique_ptr<uint8_t []> m_non_char_keys_down; bitmap_argb32 m_mouse_bitmap; render_texture * m_mouse_arrow_texture; bool m_mouse_show; @@ -280,6 +290,10 @@ private: bool m_has_warnings; std::unique_ptr<ui::machine_info> m_machine_info; + device_feature_set m_unemulated_features; + device_feature_set m_imperfect_features; + std::time_t m_last_launch_time; + std::time_t m_last_warning_time; // static variables static std::string messagebox_text; @@ -298,6 +312,8 @@ private: // private methods void exit(); + void config_load(config_type cfg_type, util::xml::data_node const *parentnode); + void config_save(config_type cfg_type, util::xml::data_node *parentnode); std::unique_ptr<slider_state> slider_alloc(int id, const char *title, int32_t minval, int32_t defval, int32_t maxval, int32_t incval, void *arg); // slider controls |