summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/machine/spg110_video.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/machine/spg110_video.cpp')
-rw-r--r--src/devices/machine/spg110_video.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/devices/machine/spg110_video.cpp b/src/devices/machine/spg110_video.cpp
index a76fef3bb60..daf7fa5e158 100644
--- a/src/devices/machine/spg110_video.cpp
+++ b/src/devices/machine/spg110_video.cpp
@@ -4,6 +4,9 @@
#include "emu.h"
#include "spg110_video.h"
+#include <algorithm>
+
+
DEFINE_DEVICE_TYPE(SPG110_VIDEO, spg110_video_device, "spg110_video", "SPG110 System-on-a-Chip (Video)")
spg110_video_device::spg110_video_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) :
@@ -649,9 +652,9 @@ uint32_t spg110_video_device::screen_update(screen_device &screen, bitmap_rgb32
for (int y = cliprect.min_y; y <= cliprect.max_y; y++)
{
- uint32_t *dest = &bitmap.pix32(y, cliprect.min_x);
- uint32_t *src = &m_screenbuf[cliprect.min_x + 320 * y];
- memcpy(dest, src, sizeof(uint32_t) * ((cliprect.max_x - cliprect.min_x) + 1));
+ uint32_t *dest = &bitmap.pix(y, cliprect.min_x);
+ const uint32_t *src = &m_screenbuf[cliprect.min_x + 320 * y];
+ std::copy_n(src, cliprect.width(), dest);
}
return 0;