diff options
| author | Matthew Parlane <parlane@gmail.com> | 2013-11-17 11:12:07 +1300 |
|---|---|---|
| committer | Matthew Parlane <parlane@gmail.com> | 2013-11-17 11:14:38 +1300 |
| commit | 33d8166620d308f5d7644e64ca92e588ff75fa44 (patch) | |
| tree | d7fa08d4b12bd3119af0e76632cd29fb86aa4693 /Source/Core/VideoBackends/Software/Src/DebugUtil.cpp | |
| parent | cce869ae0169970ef20663d04701c58527755ddf (diff) | |
Use IOFile for TextureToPng to support non-ascii
Changed save texture/screenshot uses to std::string
Removed unneeded new/delete calls when dealing with temp data.
Diffstat (limited to 'Source/Core/VideoBackends/Software/Src/DebugUtil.cpp')
| -rw-r--r-- | Source/Core/VideoBackends/Software/Src/DebugUtil.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/Core/VideoBackends/Software/Src/DebugUtil.cpp b/Source/Core/VideoBackends/Software/Src/DebugUtil.cpp index 106b32647c..bac6ef6152 100644 --- a/Source/Core/VideoBackends/Software/Src/DebugUtil.cpp +++ b/Source/Core/VideoBackends/Software/Src/DebugUtil.cpp @@ -42,7 +42,7 @@ void Init() } } -void SaveTexture(const char* filename, u32 texmap, s32 mip) +void SaveTexture(const std::string filename, u32 texmap, s32 mip) { FourTexUnits& texUnit = bpmem.tex[(texmap >> 2) & 1]; u8 subTexmap = texmap & 3; @@ -98,7 +98,7 @@ void DumpActiveTextures() for (s32 mip = 0; mip <= maxLod; ++mip) { SaveTexture(StringFromFormat("%star%i_ind%i_map%i_mip%i.png", - File::GetUserPath(D_DUMPTEXTURES_IDX).c_str(), + File::GetUserPath(D_DUMPTEXTURES_IDX), swstats.thisFrame.numDrawnObjects, stageNum, texmap, mip).c_str(), texmap, mip); } } @@ -115,7 +115,7 @@ void DumpActiveTextures() for (s32 mip = 0; mip <= maxLod; ++mip) { SaveTexture(StringFromFormat("%star%i_stage%i_map%i_mip%i.png", - File::GetUserPath(D_DUMPTEXTURES_IDX).c_str(), + File::GetUserPath(D_DUMPTEXTURES_IDX), swstats.thisFrame.numDrawnObjects, stageNum, texmap, mip).c_str(), texmap, mip); } } @@ -242,7 +242,7 @@ void OnObjectEnd() File::GetUserPath(D_DUMPFRAMES_IDX).c_str(), swstats.thisFrame.numDrawnObjects, ObjectBufferName[i], i - BufferBase[i]); - (void)TextureToPng((u8*)ObjectBuffer[i], EFB_WIDTH * 4, filename.c_str(), EFB_WIDTH, EFB_HEIGHT, true); + (void)TextureToPng((u8*)ObjectBuffer[i], EFB_WIDTH * 4, filename, EFB_WIDTH, EFB_HEIGHT, true); memset(ObjectBuffer[i], 0, sizeof(ObjectBuffer[i])); } |
