summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author hap <happppp@users.noreply.github.com>2023-08-24 11:49:24 +0200
committer hap <happppp@users.noreply.github.com>2023-08-24 11:49:24 +0200
commit7c3d247e5a267da0281283c54363c701fd2e10af (patch)
tree2fb901ff762804d27b31c1cf250d109b0769d19a
parent69113a710ef0fac3d2faa572f1a1bb85a6dc5bbc (diff)
ui/info: swap notworking/mechanical warnings, only add initial \n if there were warnings before it
-rw-r--r--src/frontend/mame/ui/info.cpp16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/frontend/mame/ui/info.cpp b/src/frontend/mame/ui/info.cpp
index 925e6efa58d..32b081d7a16 100644
--- a/src/frontend/mame/ui/info.cpp
+++ b/src/frontend/mame/ui/info.cpp
@@ -129,6 +129,8 @@ void get_device_warnings(std::ostream &buf, device_t::feature_type unemulated, d
void get_system_warnings(std::ostream &buf, running_machine &machine, machine_flags::type flags, device_t::feature_type unemulated, device_t::feature_type imperfect)
{
+ std::streampos start_position = buf.tellp();
+
// start with the unemulated/imperfect features
get_device_warnings(buf, unemulated, imperfect);
@@ -143,10 +145,18 @@ void get_system_warnings(std::ostream &buf, running_machine &machine, machine_fl
buf << _("This system has no sound hardware, MAME will produce no sounds, this is expected behaviour.\n");
// these are more severe warnings
- if (flags & ::machine_flags::NOT_WORKING)
- buf << _("\nTHIS SYSTEM DOESN'T WORK. The emulation for this system is not yet complete. There is nothing you can do to fix this problem except wait for the developers to improve the emulation.\n");
if (flags & ::machine_flags::MECHANICAL)
- buf << _("\nElements of this system cannot be emulated accurately as they require physical interaction or consist of mechanical devices. It is not possible to fully experience this system.\n");
+ {
+ if (buf.tellp() > start_position)
+ buf << '\n';
+ buf << _("Elements of this system cannot be emulated accurately as they require physical interaction or consist of mechanical devices. It is not possible to fully experience this system.\n");
+ }
+ if (flags & ::machine_flags::NOT_WORKING)
+ {
+ if (buf.tellp() > start_position)
+ buf << '\n';
+ buf << _("THIS SYSTEM DOESN'T WORK. The emulation for this system is not yet complete. There is nothing you can do to fix this problem except wait for the developers to improve the emulation.\n");
+ }
if ((flags & MACHINE_ERRORS) || ((machine.system().type.unemulated_features() | machine.system().type.imperfect_features()) & device_t::feature::PROTECTION))
{