mirror of
https://github.com/holub/mame
synced 2025-04-25 09:50:04 +03:00
Changing FASTDEBUG to be assert-free is too big a change to push through without public discussion
This commit is contained in:
parent
4282a7c9f2
commit
ca94bb7905
@ -67,10 +67,7 @@ private:
|
||||
#undef assert
|
||||
#undef assert_always
|
||||
|
||||
#if defined(MAME_DEBUG_FAST)
|
||||
#define assert(x) do { } while (0)
|
||||
#define assert_always(x, msg) do { if (!(x)) throw emu_fatalerror("Fatal error: %s\nCaused by assert: %s:%d: %s", msg, __FILE__, __LINE__, #x); } while (0)
|
||||
#elif defined(MAME_DEBUG)
|
||||
#ifdef MAME_DEBUG
|
||||
#define assert(x) do { if (!(x)) throw emu_fatalerror("assert: %s:%d: %s", __FILE__, __LINE__, #x); } while (0)
|
||||
#define assert_always(x, msg) do { if (!(x)) throw emu_fatalerror("Fatal error: %s\nCaused by assert: %s:%d: %s", msg, __FILE__, __LINE__, #x); } while (0)
|
||||
#else
|
||||
|
@ -451,7 +451,9 @@ void device_scheduler::timeslice()
|
||||
attoseconds_t delta = target.attoseconds - exec->m_localtime.attoseconds;
|
||||
if (delta < 0 && target.seconds > exec->m_localtime.seconds)
|
||||
delta += ATTOSECONDS_PER_SECOND;
|
||||
#ifndef MAME_DEBUG_FAST
|
||||
assert(delta == (target - exec->m_localtime).as_attoseconds());
|
||||
#endif
|
||||
|
||||
// if we have enough for at least 1 cycle, do the math
|
||||
if (delta >= exec->m_attoseconds_per_cycle)
|
||||
|
Loading…
Reference in New Issue
Block a user