mirror of
https://github.com/holub/mame
synced 2025-04-19 15:11:37 +03:00
Validity checking improvements
- Always print the name of each driver checked with -validate -verbose, and print before beginning the check to help detect crashes - Fix already_checked test so that softlists get validated the first time, not every time but the first - Remove #include "validity.h" where not required (nw) - attotime::from_double cannot be constexpr because it uses floor (nw)
This commit is contained in:
parent
d061b1ddb3
commit
af80bf0e69
@ -120,7 +120,7 @@ public:
|
||||
/** @return the seconds portion. */
|
||||
constexpr seconds_t seconds() const { return m_seconds; }
|
||||
|
||||
static constexpr attotime from_double(double _time);
|
||||
static attotime from_double(double _time);
|
||||
static attotime from_ticks(UINT64 ticks, UINT32 frequency);
|
||||
/** Create an attotime from a integer count of seconds @seconds */
|
||||
static constexpr attotime from_seconds(INT32 seconds) { return attotime(seconds, 0); }
|
||||
@ -376,7 +376,7 @@ inline attotime attotime::from_ticks(UINT64 ticks, UINT32 frequency)
|
||||
}
|
||||
|
||||
/** Create an attotime from floating point count of seconds @p _time */
|
||||
inline constexpr attotime attotime::from_double(double _time)
|
||||
inline attotime attotime::from_double(double _time)
|
||||
{
|
||||
seconds_t secs = floor(_time);
|
||||
_time -= double(secs);
|
||||
|
@ -9,7 +9,6 @@
|
||||
***************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
#include "validity.h"
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
|
@ -10,7 +10,6 @@
|
||||
|
||||
#include "emu.h"
|
||||
#include "divtlb.h"
|
||||
#include "validity.h"
|
||||
|
||||
|
||||
|
||||
|
@ -270,6 +270,10 @@ void validity_checker::validate_end()
|
||||
|
||||
void validity_checker::validate_one(const game_driver &driver)
|
||||
{
|
||||
// help verbose validation detect configuration-related crashes
|
||||
if (m_print_verbose)
|
||||
output_via_delegate(OSD_OUTPUT_CHANNEL_ERROR, "Validating driver %s (%s)...\n", driver.name, core_filename_extract_base(driver.source_file).c_str());
|
||||
|
||||
// set the current driver
|
||||
m_current_driver = &driver;
|
||||
m_current_config = nullptr;
|
||||
@ -303,7 +307,9 @@ void validity_checker::validate_one(const game_driver &driver)
|
||||
// if we had warnings or errors, output
|
||||
if (m_errors > start_errors || m_warnings > start_warnings || !m_verbose_text.empty())
|
||||
{
|
||||
output_via_delegate(OSD_OUTPUT_CHANNEL_ERROR, "Driver %s (file %s): %d errors, %d warnings\n", driver.name, core_filename_extract_base(driver.source_file).c_str(), m_errors - start_errors, m_warnings - start_warnings);
|
||||
if (!m_print_verbose)
|
||||
output_via_delegate(OSD_OUTPUT_CHANNEL_ERROR, "Driver %s (file %s): ", driver.name, core_filename_extract_base(driver.source_file).c_str());
|
||||
output_via_delegate(OSD_OUTPUT_CHANNEL_ERROR, "%d errors, %d warnings\n", m_errors - start_errors, m_warnings - start_warnings);
|
||||
if (m_errors > start_errors)
|
||||
output_indented_errors(m_error_text, "Errors");
|
||||
if (m_warnings > start_warnings)
|
||||
|
@ -51,7 +51,7 @@ public:
|
||||
int region_length(const char *tag) { return m_region_map.find(tag)->second; }
|
||||
|
||||
// generic registry of already-checked stuff
|
||||
bool already_checked(const char *string) { return m_already_checked.insert(string).second; }
|
||||
bool already_checked(const char *string) { return !m_already_checked.insert(string).second; }
|
||||
|
||||
// osd_output interface
|
||||
|
||||
|
@ -182,7 +182,6 @@
|
||||
|
||||
|
||||
#include "includes/slapstic.h"
|
||||
#include "validity.h"
|
||||
|
||||
|
||||
extern const device_type SLAPSTIC = &device_creator<atari_slapstic_device>;
|
||||
|
Loading…
Reference in New Issue
Block a user