diff options
| author | Lioncash <mathew1800@gmail.com> | 2013-11-16 16:53:22 -0500 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2013-11-16 16:53:22 -0500 |
| commit | c46aabc8533690e998e4fb19564a18f849a991bf (patch) | |
| tree | 8c033cbee439a3c22b857f1b506cdf3ad143b05b /Source/Core/VideoBackends/Software | |
| parent | ee32c8b4e9cc621a3cc9b4e8b897204322248f53 (diff) | |
| parent | 4a9c8e6f55312127e49a4202b0a2c0438d1de00f (diff) | |
Merge branch 'master' of https://code.google.com/p/dolphin-emu
Diffstat (limited to 'Source/Core/VideoBackends/Software')
| -rw-r--r-- | Source/Core/VideoBackends/Software/Src/DebugUtil.cpp | 4 | ||||
| -rw-r--r-- | Source/Core/VideoBackends/Software/Src/SWRenderer.cpp | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/Source/Core/VideoBackends/Software/Src/DebugUtil.cpp b/Source/Core/VideoBackends/Software/Src/DebugUtil.cpp index 3f21e6a758..106b32647c 100644 --- a/Source/Core/VideoBackends/Software/Src/DebugUtil.cpp +++ b/Source/Core/VideoBackends/Software/Src/DebugUtil.cpp @@ -57,6 +57,7 @@ void SaveTexture(const char* filename, u32 texmap, s32 mip) GetTextureRGBA(data, texmap, mip, width, height); (void)TextureToPng(data, width*4, filename, width, height, true); + delete[] data; } @@ -140,6 +141,7 @@ void DumpEfb(const char* filename) } (void)TextureToPng(data, EFB_WIDTH * 4, filename, EFB_WIDTH, EFB_HEIGHT, true); + delete[] data; } void DumpDepth(const char* filename) @@ -161,6 +163,7 @@ void DumpDepth(const char* filename) } (void)TextureToPng(data, EFB_WIDTH * 4, filename, EFB_WIDTH, EFB_HEIGHT, true); + delete[] data; } void DrawObjectBuffer(s16 x, s16 y, u8 *color, int bufferBase, int subBuffer, const char *name) @@ -241,6 +244,7 @@ void OnObjectEnd() (void)TextureToPng((u8*)ObjectBuffer[i], EFB_WIDTH * 4, filename.c_str(), EFB_WIDTH, EFB_HEIGHT, true); memset(ObjectBuffer[i], 0, sizeof(ObjectBuffer[i])); + } } diff --git a/Source/Core/VideoBackends/Software/Src/SWRenderer.cpp b/Source/Core/VideoBackends/Software/Src/SWRenderer.cpp index fc26a93ad5..1f5430ae49 100644 --- a/Source/Core/VideoBackends/Software/Src/SWRenderer.cpp +++ b/Source/Core/VideoBackends/Software/Src/SWRenderer.cpp @@ -142,9 +142,7 @@ void SWRenderer::DrawTexture(u8 *texture, int width, int height) if (s_bScreenshot) { std::lock_guard<std::mutex> lk(s_criticalScreenshot); - u8 *data = new u8[width * 4 * height]; - memcpy(data, texture, sizeof(u8) * 4 * width * height); - TextureToPng(data, width*4, s_sScreenshotName.c_str(), width, height, false); + TextureToPng(texture, width*4, s_sScreenshotName.c_str(), width, height, false); // Reset settings s_sScreenshotName.clear(); s_bScreenshot = false; |
