Give Dump Objects dedicated folder and tooltip
This commit is contained in:
parent
f09f83c309
commit
45b9b7d211
|
@ -47,6 +47,7 @@
|
|||
#define DUMP_DIR "Dump"
|
||||
#define DUMP_TEXTURES_DIR "Textures"
|
||||
#define DUMP_FRAMES_DIR "Frames"
|
||||
#define DUMP_OBJECTS_DIR "Objects"
|
||||
#define DUMP_AUDIO_DIR "Audio"
|
||||
#define DUMP_DSP_DIR "DSP"
|
||||
#define DUMP_SSL_DIR "SSL"
|
||||
|
|
|
@ -767,6 +767,7 @@ static void RebuildUserDirectories(unsigned int dir_index)
|
|||
s_user_paths[D_HIRESTEXTURES_IDX] = s_user_paths[D_LOAD_IDX] + HIRES_TEXTURES_DIR DIR_SEP;
|
||||
s_user_paths[D_DUMP_IDX] = s_user_paths[D_USER_IDX] + DUMP_DIR DIR_SEP;
|
||||
s_user_paths[D_DUMPFRAMES_IDX] = s_user_paths[D_DUMP_IDX] + DUMP_FRAMES_DIR DIR_SEP;
|
||||
s_user_paths[D_DUMPOBJECTS_IDX] = s_user_paths[D_DUMP_IDX] + DUMP_OBJECTS_DIR DIR_SEP;
|
||||
s_user_paths[D_DUMPAUDIO_IDX] = s_user_paths[D_DUMP_IDX] + DUMP_AUDIO_DIR DIR_SEP;
|
||||
s_user_paths[D_DUMPTEXTURES_IDX] = s_user_paths[D_DUMP_IDX] + DUMP_TEXTURES_DIR DIR_SEP;
|
||||
s_user_paths[D_DUMPDSP_IDX] = s_user_paths[D_DUMP_IDX] + DUMP_DSP_DIR DIR_SEP;
|
||||
|
@ -822,6 +823,7 @@ static void RebuildUserDirectories(unsigned int dir_index)
|
|||
|
||||
case D_DUMP_IDX:
|
||||
s_user_paths[D_DUMPFRAMES_IDX] = s_user_paths[D_DUMP_IDX] + DUMP_FRAMES_DIR DIR_SEP;
|
||||
s_user_paths[D_DUMPOBJECTS_IDX] = s_user_paths[D_DUMP_IDX] + DUMP_OBJECTS_DIR DIR_SEP;
|
||||
s_user_paths[D_DUMPAUDIO_IDX] = s_user_paths[D_DUMP_IDX] + DUMP_AUDIO_DIR DIR_SEP;
|
||||
s_user_paths[D_DUMPTEXTURES_IDX] = s_user_paths[D_DUMP_IDX] + DUMP_TEXTURES_DIR DIR_SEP;
|
||||
s_user_paths[D_DUMPDSP_IDX] = s_user_paths[D_DUMP_IDX] + DUMP_DSP_DIR DIR_SEP;
|
||||
|
|
|
@ -36,6 +36,7 @@ enum
|
|||
D_HIRESTEXTURES_IDX,
|
||||
D_DUMP_IDX,
|
||||
D_DUMPFRAMES_IDX,
|
||||
D_DUMPOBJECTS_IDX,
|
||||
D_DUMPAUDIO_IDX,
|
||||
D_DUMPTEXTURES_IDX,
|
||||
D_DUMPDSP_IDX,
|
||||
|
|
|
@ -161,7 +161,12 @@ void SoftwareRendererWidget::AddDescriptions()
|
|||
QT_TR_NOOP("Dump decoded game textures to User/Dump/Textures/<game_id>/.\n\nIf unsure, leave "
|
||||
"this unchecked.");
|
||||
|
||||
static const char* TR_DUMP_OBJECTS_DESCRIPTION =
|
||||
QT_TR_NOOP("Dump objects to User/Dump/Objects/.\n\nIf unsure, leave "
|
||||
"this unchecked.");
|
||||
|
||||
AddDescription(m_backend_combo, TR_BACKEND_DESCRIPTION);
|
||||
AddDescription(m_show_statistics, TR_SHOW_STATISTICS_DESCRIPTION);
|
||||
AddDescription(m_dump_textures, TR_DUMP_TEXTURES_DESCRIPTION);
|
||||
AddDescription(m_dump_objects, TR_DUMP_OBJECTS_DESCRIPTION);
|
||||
}
|
||||
|
|
|
@ -50,13 +50,13 @@ namespace UICommon
|
|||
{
|
||||
static void CreateDumpPath(const std::string& path)
|
||||
{
|
||||
if (path.empty())
|
||||
return;
|
||||
File::SetUserPath(D_DUMP_IDX, path + '/');
|
||||
if (!path.empty())
|
||||
File::SetUserPath(D_DUMP_IDX, path + '/');
|
||||
File::CreateFullPath(File::GetUserPath(D_DUMPAUDIO_IDX));
|
||||
File::CreateFullPath(File::GetUserPath(D_DUMPDSP_IDX));
|
||||
File::CreateFullPath(File::GetUserPath(D_DUMPSSL_IDX));
|
||||
File::CreateFullPath(File::GetUserPath(D_DUMPFRAMES_IDX));
|
||||
File::CreateFullPath(File::GetUserPath(D_DUMPOBJECTS_IDX));
|
||||
File::CreateFullPath(File::GetUserPath(D_DUMPTEXTURES_IDX));
|
||||
}
|
||||
|
||||
|
|
|
@ -200,7 +200,7 @@ void OnObjectEnd()
|
|||
{
|
||||
if (g_ActiveConfig.bDumpObjects && stats.thisFrame.numDrawnObjects >= g_ActiveConfig.drawStart &&
|
||||
stats.thisFrame.numDrawnObjects < g_ActiveConfig.drawEnd)
|
||||
DumpEfb(StringFromFormat("%sobject%i.png", File::GetUserPath(D_DUMPFRAMES_IDX).c_str(),
|
||||
DumpEfb(StringFromFormat("%sobject%i.png", File::GetUserPath(D_DUMPOBJECTS_IDX).c_str(),
|
||||
stats.thisFrame.numDrawnObjects));
|
||||
|
||||
for (int i = 0; i < NUM_OBJECT_BUFFERS; i++)
|
||||
|
@ -209,7 +209,7 @@ void OnObjectEnd()
|
|||
{
|
||||
DrawnToBuffer[i] = false;
|
||||
std::string filename =
|
||||
StringFromFormat("%sobject%i_%s(%i).png", File::GetUserPath(D_DUMPFRAMES_IDX).c_str(),
|
||||
StringFromFormat("%sobject%i_%s(%i).png", File::GetUserPath(D_DUMPOBJECTS_IDX).c_str(),
|
||||
stats.thisFrame.numDrawnObjects, ObjectBufferName[i], i - BufferBase[i]);
|
||||
|
||||
TextureToPng((u8*)ObjectBuffer[i], EFB_WIDTH * 4, filename, EFB_WIDTH, EFB_HEIGHT, true);
|
||||
|
|
Loading…
Reference in New Issue