2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 22:27:41 +00:00

Better progress logging

This commit is contained in:
Jack Andersen
2015-09-02 12:00:40 -10:00
parent 5fb8287d50
commit 416f085448
6 changed files with 54 additions and 48 deletions

View File

@@ -323,7 +323,8 @@ public:
return m_pak->bestEntryName(*e);
}
bool extractResources(const BRIDGETYPE& pakBridge, bool force, std::function<void(float)> progress)
bool extractResources(const BRIDGETYPE& pakBridge, bool force,
std::function<void(const HECL::SystemChar*, float)> progress)
{
enterPAKBridge(pakBridge);
size_t count = 0;
@@ -336,6 +337,9 @@ public:
ResExtractor<BRIDGETYPE> extractor = BRIDGETYPE::LookupExtractor(*item.second);
if (extractor.weight != w)
continue;
HECL::SystemStringView bestName(getBestEntryName(*item.second));
progress(bestName.sys_str().c_str(), ++count / fsz);
HECL::ProjectPath cooked = getCooked(item.second);
if (force || cooked.getPathType() == HECL::ProjectPath::PT_NONE)
@@ -363,8 +367,6 @@ public:
extractor.func_b(m_dataSpec, s, working, *this, *item.second, force);
}
}
progress(++count / fsz);
}
}