mirror of
https://github.com/holub/mame
synced 2025-10-06 00:54:22 +03:00
Fix errors from faulty merge (nw)
This commit is contained in:
parent
6b443c5877
commit
a0d3f281ba
@ -609,8 +609,8 @@ void validity_checker::validate_roms()
|
|||||||
device_iterator deviter(m_current_config->root_device());
|
device_iterator deviter(m_current_config->root_device());
|
||||||
for (device_t *device = deviter.first(); device != nullptr; device = deviter.next())
|
for (device_t *device = deviter.first(); device != nullptr; device = deviter.next())
|
||||||
{
|
{
|
||||||
// for non-root devices, track the current device
|
// track the current device
|
||||||
m_current_device = (device->owner() == nullptr) ? nullptr : device;
|
m_current_device = device;
|
||||||
|
|
||||||
// scan the ROM entries for this device
|
// scan the ROM entries for this device
|
||||||
const char *last_region_name = "???";
|
const char *last_region_name = "???";
|
||||||
@ -874,8 +874,8 @@ void validity_checker::validate_inputs()
|
|||||||
if (device->input_ports() == nullptr)
|
if (device->input_ports() == nullptr)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// for non-root devices, track the current device
|
// track the current device
|
||||||
m_current_device = (device == &m_current_config->root_device()) ? nullptr : device;
|
m_current_device = device;
|
||||||
|
|
||||||
// allocate the input ports
|
// allocate the input ports
|
||||||
ioport_list portlist;
|
ioport_list portlist;
|
||||||
@ -977,8 +977,8 @@ void validity_checker::validate_devices()
|
|||||||
device_iterator iter(m_current_config->root_device());
|
device_iterator iter(m_current_config->root_device());
|
||||||
for (const device_t *device = iter.first(); device != nullptr; device = iter.next())
|
for (const device_t *device = iter.first(); device != nullptr; device = iter.next())
|
||||||
{
|
{
|
||||||
// for non-root devices, track the current device
|
// track the current device
|
||||||
m_current_device = (device == &m_current_config->root_device()) ? nullptr : device;
|
m_current_device = device;
|
||||||
|
|
||||||
// validate the device tag
|
// validate the device tag
|
||||||
validate_tag(device->basetag());
|
validate_tag(device->basetag());
|
||||||
@ -1042,9 +1042,9 @@ void validity_checker::build_output_prefix(std::string &str)
|
|||||||
// start empty
|
// start empty
|
||||||
str.clear();
|
str.clear();
|
||||||
|
|
||||||
// if we have a current device, indicate that
|
// if we have a current (non-root) device, indicate that
|
||||||
if (m_current_device != nullptr)
|
if (m_current_device != nullptr && m_current_device->owner() != nullptr)
|
||||||
str.append(m_current_device->name()).append(" device '").append(m_current_device->tag()).append("': ");
|
str.append(m_current_device->name()).append(" device '").append(m_current_device->tag()+1).append("': ");
|
||||||
|
|
||||||
// if we have a current port, indicate that as well
|
// if we have a current port, indicate that as well
|
||||||
if (m_current_ioport != nullptr)
|
if (m_current_ioport != nullptr)
|
||||||
@ -1115,3 +1115,16 @@ void validity_checker::output_via_delegate(osd_output_channel channel, const cha
|
|||||||
this->chain_output(channel, format, argptr);
|
this->chain_output(channel, format, argptr);
|
||||||
va_end(argptr);
|
va_end(argptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//-------------------------------------------------
|
||||||
|
// output_indented_errors - helper to output error
|
||||||
|
// and warning messages with header and indents
|
||||||
|
//-------------------------------------------------
|
||||||
|
void validity_checker::output_indented_errors(std::string &text, const char *header)
|
||||||
|
{
|
||||||
|
// remove trailing newline
|
||||||
|
if (text[text.size()-1] == '\n')
|
||||||
|
text.erase(text.size()-1, 1);
|
||||||
|
strreplace(text, "\n", "\n ");
|
||||||
|
output_via_delegate(OSD_OUTPUT_CHANNEL_ERROR, "%s:\n %s\n", header, text.c_str());
|
||||||
|
}
|
||||||
|
@ -84,6 +84,7 @@ private:
|
|||||||
// output helpers
|
// output helpers
|
||||||
void build_output_prefix(std::string &str);
|
void build_output_prefix(std::string &str);
|
||||||
void output_via_delegate(osd_output_channel channel, const char *format, ...) ATTR_PRINTF(3,4);
|
void output_via_delegate(osd_output_channel channel, const char *format, ...) ATTR_PRINTF(3,4);
|
||||||
|
void output_indented_errors(std::string &text, const char *header);
|
||||||
|
|
||||||
// internal driver list
|
// internal driver list
|
||||||
driver_enumerator m_drivlist;
|
driver_enumerator m_drivlist;
|
||||||
|
Loading…
Reference in New Issue
Block a user