mirror of
https://github.com/holub/mame
synced 2025-05-08 07:11:42 +03:00
Avoid inline osd calls in header file.
This commit is contained in:
parent
11af4265a0
commit
53ee1c4138
@ -110,3 +110,16 @@ bool finder_base::report_missing(bool found, const char *objname, bool required)
|
||||
osd_printf_verbose("Optional %s '%s' not found\n", objname, m_tag);
|
||||
return !required;
|
||||
}
|
||||
|
||||
|
||||
void finder_base::printf_warning(const char *format, ...)
|
||||
{
|
||||
va_list argptr;
|
||||
char buffer[1024];
|
||||
|
||||
/* do the output */
|
||||
va_start(argptr, format);
|
||||
vsnprintf(buffer, 1024, format, argptr);
|
||||
osd_printf_warning("%s", buffer);
|
||||
va_end(argptr);
|
||||
}
|
||||
|
@ -57,6 +57,8 @@ protected:
|
||||
void *find_memshare(UINT8 width, size_t &bytes, bool required);
|
||||
bool report_missing(bool found, const char *objname, bool required);
|
||||
|
||||
void printf_warning(const char *format, ...) ATTR_PRINTF(2,3);
|
||||
|
||||
// internal state
|
||||
finder_base *m_next;
|
||||
device_t &m_base;
|
||||
@ -113,8 +115,7 @@ public:
|
||||
this->m_target = dynamic_cast<_DeviceClass *>(device);
|
||||
if (device != NULL && this->m_target == NULL)
|
||||
{
|
||||
void osd_printf_warning(const char *format, ...) ATTR_PRINTF(1,2);
|
||||
osd_printf_warning("Device '%s' found but is of incorrect type (actual type is %s)\n", this->m_tag, device->name());
|
||||
this->printf_warning("Device '%s' found but is of incorrect type (actual type is %s)\n", this->m_tag, device->name());
|
||||
}
|
||||
return this->report_missing(this->m_target != NULL, "device", _Required);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user