diff options
-rw-r--r-- | backends/platform/3ds/osystem-graphics.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/backends/platform/3ds/osystem-graphics.cpp b/backends/platform/3ds/osystem-graphics.cpp index 15fabc7a01..8e7ae89486 100644 --- a/backends/platform/3ds/osystem-graphics.cpp +++ b/backends/platform/3ds/osystem-graphics.cpp @@ -415,8 +415,11 @@ void OSystem_3DS::clearOverlay() { } void OSystem_3DS::grabOverlay(void *buf, int pitch) { + byte *dst = (byte *)buf; + for (int y = 0; y < getOverlayHeight(); ++y) { - memcpy(buf, _overlay.getBasePtr(0, y), pitch); + memcpy(dst, _overlay.getBasePtr(0, y), getOverlayWidth() * _pfGameTexture.bytesPerPixel); + dst += pitch; } } |