summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/video/sed1520.cpp
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2018-03-02 14:22:07 +1100
committer Vas Crabb <vas@vastheman.com>2018-03-02 14:22:07 +1100
commit3d09b31c84274b0b50f41bab8a11fd2e0f3abde4 (patch)
treeccf1fcbda8dba8e593798ba37a545b36b24dd8d2 /src/devices/video/sed1520.cpp
parent4aa7d2210675c34b3c99ebb1718272fc9e22f935 (diff)
another pile of cleanup (nw)
Diffstat (limited to 'src/devices/video/sed1520.cpp')
-rw-r--r--src/devices/video/sed1520.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/devices/video/sed1520.cpp b/src/devices/video/sed1520.cpp
index 708d685ad18..feca2ed10fd 100644
--- a/src/devices/video/sed1520.cpp
+++ b/src/devices/video/sed1520.cpp
@@ -33,7 +33,7 @@ DEFINE_DEVICE_TYPE(SED1520, sed1520_device, "sed1520", "Epson SED1520")
sed1520_device::sed1520_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
device_t(mconfig, SED1520, tag, owner, clock), m_lcd_on(0), m_busy(0), m_page(0), m_column(0), m_old_column(0), m_start_line(0),
m_adc(0), m_static_drive(0), m_modify_write(false),
- m_screen_update_func(nullptr)
+ m_screen_update_cb()
{
}
@@ -44,6 +44,8 @@ sed1520_device::sed1520_device(const machine_config &mconfig, const char *tag, d
void sed1520_device::device_start()
{
+ m_screen_update_cb.bind_relative_to(*owner());
+
// state saving
save_item(NAME(m_lcd_on));
save_item(NAME(m_busy));
@@ -84,8 +86,8 @@ uint32_t sed1520_device::screen_update(screen_device &screen, bitmap_ind16 &bitm
{
if (m_lcd_on)
{
- if (m_screen_update_func)
- m_screen_update_func(*this, bitmap, cliprect, m_vram, m_start_line, m_adc);
+ if (!m_screen_update_cb.isnull())
+ m_screen_update_cb(bitmap, cliprect, m_vram, m_start_line, m_adc);
}
else if (m_static_drive)
return UPDATE_HAS_NOT_CHANGED;