From ff741fe9541e51c6def2f0ce4961351cc4cae630 Mon Sep 17 00:00:00 2001 From: Couriersud Date: Fri, 27 Dec 2013 20:07:20 +0000 Subject: [PATCH] Hopefully fix windows build: Commit two files which escaped my attention. No NW. --- src/emu/video/fixfreq.c | 20 ++++++++++---------- src/emu/video/fixfreq.h | 3 ++- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/src/emu/video/fixfreq.c b/src/emu/video/fixfreq.c index 3437c604c39..ad975332eca 100644 --- a/src/emu/video/fixfreq.c +++ b/src/emu/video/fixfreq.c @@ -245,18 +245,18 @@ UINT32 fixedfreq_device::screen_update(screen_device &screen, bitmap_rgb32 &bitm return 0; } -void fixedfreq_device::update_vid(double newval, attotime cur_time) +NETDEV_ANALOG_CALLBACK_MEMBER(fixedfreq_device::update_vid) { bitmap_rgb32 *bm = m_bitmap[m_cur_bm]; const int has_fields = (m_fieldcount > 1) ? 1: 0; - int pixels = round((cur_time - m_line_time).as_double() / m_clock_period.as_double()); - attotime time = (cur_time - m_last_time); + int pixels = round((time - m_line_time).as_double() / m_clock_period.as_double()); + attotime delta_time = (time - m_last_time); - if (newval == m_vid) + if (data == m_vid) return; - ATTR_UNUSED int sync = sync_separator(time, newval); + ATTR_UNUSED int sync = sync_separator(delta_time, data); if (m_last_y < bm->height()) { @@ -297,19 +297,19 @@ void fixedfreq_device::update_vid(double newval, attotime cur_time) m_last_y = m_vbackporch - m_vsync; // 6; // FIXME: needed for pong - need to be able to adjust screen parameters // toggle bitmap m_cur_bm ^= 1; - update_screen_parameters(cur_time - m_last_vsync_time); - m_last_vsync_time = cur_time; + update_screen_parameters(time - m_last_vsync_time); + m_last_vsync_time = time; } if ((sync & 2) && !m_sig_vsync) { m_last_y += m_fieldcount; m_last_x = 0; - m_line_time = cur_time; + m_line_time = time; } - m_last_time = cur_time; - m_vid = newval; + m_last_time = time; + m_vid = data; } diff --git a/src/emu/video/fixfreq.h b/src/emu/video/fixfreq.h index 0caa57871d9..9426dc6346c 100644 --- a/src/emu/video/fixfreq.h +++ b/src/emu/video/fixfreq.h @@ -13,6 +13,7 @@ #define FIXFREQ_H #include "emu.h" +#include "machine/netlist.h" #define FIXFREQ_INTERFACE(name) \ const fixedfreq_interface (name) = @@ -56,7 +57,7 @@ public: virtual UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - void update_vid(const double newval, const attotime cur_time); + NETDEV_ANALOG_CALLBACK_MEMBER(update_vid); protected: // device-level overrides