Skip to content

Commit

Permalink
Update for latest LUS main.
Browse files Browse the repository at this point in the history
  • Loading branch information
Malkierian committed Dec 13, 2024
1 parent ffe86ba commit b81ea71
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions src/resource/ResourceManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -286,15 +286,15 @@ ResourceManager::GetCachedResource(std::variant<ResourceLoadError, std::shared_p

std::shared_ptr<std::vector<std::shared_future<std::shared_ptr<IResource>>>>
ResourceManager::LoadDirectoryAsyncWithExclude(const std::vector<std::string>& includeMasks,
const std::vector<std::string>& excludeMasks, uintptr_t owner,
const std::vector<std::string>& excludeMasks,
BS::priority_t priority) {
auto loadedList = std::make_shared<std::vector<std::shared_future<std::shared_ptr<IResource>>>>();
auto fileList = GetArchiveManager()->ListFilesWithExclude(includeMasks, excludeMasks);
loadedList->reserve(fileList->size());

for (size_t i = 0; i < fileList->size(); i++) {
auto fileName = std::string(fileList->operator[](i));
auto future = LoadResourceAsync(fileName, owner, false, priority);
auto future = LoadResourceAsync(fileName, priority);
loadedList->push_back(future);
}

Expand All @@ -319,7 +319,7 @@ ResourceManager::LoadDirectoryAsync(const ResourceIdentifier& identifier, BS::pr
std::shared_ptr<std::vector<std::shared_ptr<IResource>>>
ResourceManager::LoadDirectoryWithExclude(const std::vector<std::string>& includeMasks,
const std::vector<std::string>& excludeMasks, uintptr_t owner) {
auto futureList = LoadDirectoryAsyncWithExclude(includeMasks, excludeMasks, owner, true);
auto futureList = LoadDirectoryAsyncWithExclude(includeMasks, excludeMasks);
auto loadedList = std::make_shared<std::vector<std::shared_ptr<IResource>>>();

for (size_t i = 0; i < futureList->size(); i++) {
Expand Down Expand Up @@ -369,11 +369,11 @@ void ResourceManager::DirtyDirectory(const ResourceIdentifier& identifier) {
}

void ResourceManager::UnloadDirectoryWithExclude(const std::vector<std::string>& includeMasks,
const std::vector<std::string>& excludeMasks, uintptr_t owner) {
const std::vector<std::string>& excludeMasks) {
auto list = GetArchiveManager()->ListFilesWithExclude(includeMasks, excludeMasks);

for (const auto& key : *list.get()) {
UnloadResource(key, owner);
UnloadResource({ key, mDefaultCacheOwner, mDefaultCacheArchive });
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/resource/ResourceManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,11 @@ class ResourceManager {
LoadDirectoryAsync(const std::string& searchMask, BS::priority_t priority = BS::pr::normal);
std::shared_ptr<std::vector<std::shared_future<std::shared_ptr<IResource>>>>
LoadDirectoryAsyncWithExclude(const std::vector<std::string>& includeMasks,
const std::vector<std::string>& excludeMasks, uintptr_t owner = 0,
const std::vector<std::string>& excludeMasks,
BS::priority_t priority = BS::pr::normal);
void DirtyDirectory(const std::string& searchMask);
void UnloadDirectoryWithExclude(const std::vector<std::string>& includeMasks,
const std::vector<std::string>& excludeMasks, uintptr_t owner);
const std::vector<std::string>& excludeMasks);
void UnloadDirectory(const std::string& searchMask);

bool OtrSignatureCheck(const char* fileName);
Expand Down

0 comments on commit b81ea71

Please sign in to comment.