summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author hap <happppp@users.noreply.github.com>2020-09-13 18:28:14 +0200
committer hap <happppp@users.noreply.github.com>2020-09-13 18:28:14 +0200
commita3572727bd862176aa7458a84e2e9664c9d3f918 (patch)
treed0cd0f2205e2ca874cc3b4eee39ee0b001cb8895
parent6a2a73558de62476eed12e36c37389137d7d0178 (diff)
pwm: remove now-obsolete savestate workaround
-rw-r--r--src/devices/video/pwm.cpp26
-rw-r--r--src/devices/video/pwm.h4
2 files changed, 1 insertions, 29 deletions
diff --git a/src/devices/video/pwm.cpp b/src/devices/video/pwm.cpp
index d192c93a633..453216ded7d 100644
--- a/src/devices/video/pwm.cpp
+++ b/src/devices/video/pwm.cpp
@@ -112,8 +112,7 @@ void pwm_display_device::device_start()
save_item(NAME(m_bri));
save_item(NAME(m_update_time));
- save_item(NAME(m_acc_attos));
- save_item(NAME(m_acc_secs));
+ save_item(NAME(m_acc));
}
void pwm_display_device::device_reset()
@@ -128,29 +127,6 @@ void pwm_display_device::device_reset()
//-------------------------------------------------
-// custom savestate handling (MAME doesn't save array of attotime)
-//-------------------------------------------------
-
-void pwm_display_device::device_pre_save()
-{
- for (int y = 0; y < ARRAY_LENGTH(m_acc); y++)
- for (int x = 0; x < ARRAY_LENGTH(m_acc[0]); x++)
- {
- m_acc_attos[y][x] = m_acc[y][x].attoseconds();
- m_acc_secs[y][x] = m_acc[y][x].seconds();
- }
-}
-
-void pwm_display_device::device_post_load()
-{
- for (int y = 0; y < ARRAY_LENGTH(m_acc); y++)
- for (int x = 0; x < ARRAY_LENGTH(m_acc[0]); x++)
- m_acc[y][x] = attotime(m_acc_secs[y][x], m_acc_attos[y][x]);
-}
-
-
-
-//-------------------------------------------------
// public handlers (most of the interface is in the .h file)
//-------------------------------------------------
diff --git a/src/devices/video/pwm.h b/src/devices/video/pwm.h
index 4fba10e00d4..91a04b06620 100644
--- a/src/devices/video/pwm.h
+++ b/src/devices/video/pwm.h
@@ -59,8 +59,6 @@ protected:
// device-level overrides
virtual void device_start() override;
virtual void device_reset() override;
- virtual void device_pre_save() override;
- virtual void device_post_load() override;
private:
output_finder<0x40, 0x40> m_out_x;
@@ -90,8 +88,6 @@ private:
double m_bri[0x40][0x41];
attotime m_update_time;
attotime m_acc[0x40][0x41];
- attoseconds_t m_acc_attos[0x40][0x41];
- seconds_t m_acc_secs[0x40][0x41];
emu_timer *m_frame_timer;
TIMER_CALLBACK_MEMBER(frame_tick);