diff options
Diffstat (limited to 'src/emu')
-rw-r--r-- | src/emu/digfx.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/emu/digfx.c b/src/emu/digfx.c index 432e41f7f37..0e3dc93a71f 100644 --- a/src/emu/digfx.c +++ b/src/emu/digfx.c @@ -192,14 +192,8 @@ void device_gfx_interface::decode_gfx(const gfx_decode_entry *gfxdecodeinfo) // copy the X and Y offsets into our temporary arrays extxoffs.resize(glcopy.width * xscale); extyoffs.resize(glcopy.height * yscale); - memcpy(&extxoffs[0], glcopy.xoffset, glcopy.width * sizeof(UINT32)); - memcpy(&extyoffs[0], glcopy.yoffset, glcopy.height * sizeof(UINT32)); - - // if there are extended offsets, copy them over top - if (glcopy.extxoffs != NULL) - memcpy(&extxoffs[0], glcopy.extxoffs, glcopy.width * sizeof(UINT32)); - if (glcopy.extyoffs != NULL) - memcpy(&extyoffs[0], glcopy.extyoffs, glcopy.height * sizeof(UINT32)); + memcpy(&extxoffs[0], (glcopy.extxoffs != NULL) ? glcopy.extxoffs : glcopy.xoffset, glcopy.width * sizeof(UINT32)); + memcpy(&extyoffs[0], (glcopy.extyoffs != NULL) ? glcopy.extyoffs : glcopy.yoffset, glcopy.height * sizeof(UINT32)); // always use the extended offsets here glcopy.extxoffs = extxoffs; |