VideoCommon: Scan texture dumping directory + subdirectories to not re-dump existing files.

This commit is contained in:
Jordan Woyak
2024-03-21 09:09:35 -05:00
parent 2d5286d2e2
commit 550e008774
4 changed files with 72 additions and 20 deletions

View File

@ -4,6 +4,7 @@
#pragma once
#include <string>
#include <unordered_set>
#include "Common/CommonTypes.h"
@ -11,6 +12,18 @@ class AbstractTexture;
namespace VideoCommon::TextureUtils
{
class TextureDumper
{
public:
// Only dumps if texture did not already exist anywhere within the dump-textures path.
void DumpTexture(const ::AbstractTexture& texture, std::string basename, u32 level,
bool is_arbitrary);
private:
std::unordered_set<std::string> m_dumped_textures;
};
void DumpTexture(const ::AbstractTexture& texture, std::string basename, u32 level,
bool is_arbitrary);
}
} // namespace VideoCommon::TextureUtils