summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author hap <happppp@users.noreply.github.com>2020-08-19 18:50:16 +0200
committer hap <happppp@users.noreply.github.com>2020-08-19 18:50:16 +0200
commit73e6c57b27af0d2a22e6e75796bbd2eb18e72463 (patch)
tree2e99ab449c0d1b242cc53ca3713ca2eb249bdba5
parenta51876c942ff2d92f923d7139df8fbe03a288627 (diff)
screen: fix possible issue if update_now and update_partial are both called from driver
-rw-r--r--src/emu/screen.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/emu/screen.cpp b/src/emu/screen.cpp
index 1a4fc9faf9b..8c6e69c0059 100644
--- a/src/emu/screen.cpp
+++ b/src/emu/screen.cpp
@@ -1260,6 +1260,7 @@ bool screen_device::update_partial(int scanline)
// remember where we left off
m_last_partial_scan = scanline + 1;
+ m_partial_scan_hpos = -1;
return true;
}
@@ -1293,6 +1294,13 @@ void screen_device::update_now()
int current_hpos = hpos();
rectangle clip = m_visarea;
+ // skip if we already rendered this line
+ if (current_vpos < m_last_partial_scan)
+ {
+ LOG_PARTIAL_UPDATES(("skipped because line was already rendered\n"));
+ return;
+ }
+
// if beam position is the same, there's nothing to update
if (current_vpos == m_last_partial_scan && current_hpos == m_partial_scan_hpos)
{