setGlobalProject now called in cook transactions

This commit is contained in:
Jack Andersen 2016-07-06 18:23:36 -10:00
parent 1079c23417
commit 6ac518d99e
6 changed files with 11 additions and 4 deletions

View File

@ -110,7 +110,7 @@ public:
id = TranslatePakIdToPath(id);
}
static void setGlobalProject(hecl::Database::Project& project)
static void setThreadProject(hecl::Database::Project& project)
{
s_Project.reset(&project);
}

View File

@ -37,7 +37,7 @@ SpecBase::SpecBase(const hecl::Database::DataSpecEntry* specEntry, hecl::Databas
: hecl::Database::IDataSpec(specEntry), m_project(project), m_pc(pc),
m_masterShader(project.getProjectWorkingPath(), ".hecl/RetroMasterShader.blend")
{
DataSpec::UniqueIDBridge::setGlobalProject(m_project);
DataSpec::UniqueIDBridge::setThreadProject(m_project);
}
static const hecl::SystemString regNONE = _S("");
@ -45,6 +45,11 @@ static const hecl::SystemString regE = _S("NTSC");
static const hecl::SystemString regJ = _S("NTSC-J");
static const hecl::SystemString regP = _S("PAL");
void SpecBase::setThreadProject()
{
UniqueIDBridge::setThreadProject(m_project);
}
bool SpecBase::canExtract(const ExtractPassInfo& info, std::vector<ExtractReport>& reps)
{
m_disc = nod::OpenDiscFromImage(info.srcpath.c_str(), m_isWii);

View File

@ -13,6 +13,7 @@ namespace DataSpec
struct SpecBase : hecl::Database::IDataSpec
{
/* HECL Adaptors */
void setThreadProject();
bool canExtract(const ExtractPassInfo& info, std::vector<ExtractReport>& reps);
void doExtract(const ExtractPassInfo& info, FProgress progress);

View File

@ -281,6 +281,7 @@ void ProjectResourceFactoryBase::BackgroundIndexProc()
athena::io::YAMLDocWriter nameWriter(nullptr);
BackgroundIndexRecursiveProc(specRoot, cacheWriter, nameWriter, 0);
tagCachePath.makeDirChain(false);
FILE* cacheFile = hecl::Fopen(tagCachePath.getAbsolutePath().c_str(), _S("w"));
yaml_emitter_set_output_file(cacheWriter.getEmitter(), cacheFile);
cacheWriter.finish();

2
amuse

@ -1 +1 @@
Subproject commit 1be5d6e82114f63839eeb29766af8bd8ce331222
Subproject commit 83a2bf0b4e98c07eeed0d642b328b8b046706da2

2
hecl

@ -1 +1 @@
Subproject commit b76a72a8e0360eea64c4c58d3b1a422ba5aa5b07
Subproject commit f3d6091cf793da84ea3c7f6a1f6848cafc1f0d13