summaryrefslogtreecommitdiffstatshomepage
path: root/src/frontend/mame/ui/info.cpp
diff options
context:
space:
mode:
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
commit9445f1d8311db820dc0984e85c9c1450ce1807cd (patch)
tree43ecc4e298615b8b8388dbe9df4440b53f461b32 /src/frontend/mame/ui/info.cpp
parent654b118ff985a4011bc0caf5ce8160fa80c4b9bf (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/info.cpp')
-rw-r--r--src/frontend/mame/ui/info.cpp26
1 files changed, 24 insertions, 2 deletions
diff --git a/src/frontend/mame/ui/info.cpp b/src/frontend/mame/ui/info.cpp
index ec0c6e72700..5b6450412c6 100644
--- a/src/frontend/mame/ui/info.cpp
+++ b/src/frontend/mame/ui/info.cpp
@@ -139,13 +139,35 @@ machine_static_info::machine_static_info(const ui_options &options, machine_conf
//-------------------------------------------------
+// has_warnings - returns true if the system has
+// issues that warrant a yellow/red message
+//-------------------------------------------------
+
+bool machine_static_info::has_warnings() const
+{
+ return (machine_flags() & (MACHINE_ERRORS | MACHINE_WARNINGS)) || unemulated_features() || imperfect_features();
+}
+
+
+//-------------------------------------------------
+// has_severe_warnings - returns true if the
+// system has issues that warrant a red message
+//-------------------------------------------------
+
+bool machine_static_info::has_severe_warnings() const
+{
+ return (machine_flags() & MACHINE_ERRORS) || ((unemulated_features() | imperfect_features()) & device_t::feature::PROTECTION);
+}
+
+
+//-------------------------------------------------
// status_color - returns suitable colour for
// driver status box
//-------------------------------------------------
rgb_t machine_static_info::status_color() const
{
- if ((machine_flags() & MACHINE_ERRORS) || ((unemulated_features() | imperfect_features()) & device_t::feature::PROTECTION))
+ if (has_severe_warnings())
return UI_RED_COLOR;
else if ((machine_flags() & MACHINE_WARNINGS & ~::machine_flags::REQUIRES_ARTWORK) || unemulated_features() || imperfect_features())
return UI_YELLOW_COLOR;
@@ -161,7 +183,7 @@ rgb_t machine_static_info::status_color() const
rgb_t machine_static_info::warnings_color() const
{
- if ((machine_flags() & MACHINE_ERRORS) || ((unemulated_features() | imperfect_features()) & device_t::feature::PROTECTION))
+ if (has_severe_warnings())
return UI_RED_COLOR;
else if ((machine_flags() & MACHINE_WARNINGS) || unemulated_features() || imperfect_features())
return UI_YELLOW_COLOR;