summaryrefslogtreecommitdiff
path: root/src/core/file_sys
diff options
context:
space:
mode:
authorGravatar Zach Hilman2019-06-25 22:25:10 -0400
committerGravatar Zach Hilman2019-06-25 22:25:10 -0400
commitd10fc2d7277cf075f875fe2831501cb79c50e21a (patch)
treea1ef0e65dfd79f8badde8dcd24014432428c51f8 /src/core/file_sys
parentcore: Keep track of ARPManager and register current application on boot (diff)
downloadyuzu-d10fc2d7277cf075f875fe2831501cb79c50e21a.tar.gz
yuzu-d10fc2d7277cf075f875fe2831501cb79c50e21a.tar.xz
yuzu-d10fc2d7277cf075f875fe2831501cb79c50e21a.zip
glue: Correct missing bytes in ApplicationLaunchParameter
Diffstat (limited to 'src/core/file_sys')
-rw-r--r--src/core/file_sys/patch_manager.h3
-rw-r--r--src/core/file_sys/registered_cache.cpp14
2 files changed, 10 insertions, 7 deletions
diff --git a/src/core/file_sys/patch_manager.h b/src/core/file_sys/patch_manager.h
index f82b4ae1e..a363c6577 100644
--- a/src/core/file_sys/patch_manager.h
+++ b/src/core/file_sys/patch_manager.h
@@ -66,6 +66,9 @@ public:
66 std::map<std::string, std::string, std::less<>> GetPatchVersionNames( 66 std::map<std::string, std::string, std::less<>> GetPatchVersionNames(
67 VirtualFile update_raw = nullptr) const; 67 VirtualFile update_raw = nullptr) const;
68 68
69 // If the game update exists, returns the u32 version field in its Meta-type NCA. If that fails,
70 // it will fallback to the Meta-type NCA of the base game. If that fails, the result will be
71 // std::nullopt
69 std::optional<u32> GetGameVersion() const; 72 std::optional<u32> GetGameVersion() const;
70 73
71 // Given title_id of the program, attempts to get the control data of the update and parse 74 // Given title_id of the program, attempts to get the control data of the update and parse
diff --git a/src/core/file_sys/registered_cache.cpp b/src/core/file_sys/registered_cache.cpp
index 3bb921210..4608490e0 100644
--- a/src/core/file_sys/registered_cache.cpp
+++ b/src/core/file_sys/registered_cache.cpp
@@ -647,16 +647,16 @@ ContentProviderUnion::ListEntriesFilterOrigin(std::optional<ContentProviderUnion
647 647
648std::optional<ContentProviderUnionSlot> ContentProviderUnion::GetSlotForEntry( 648std::optional<ContentProviderUnionSlot> ContentProviderUnion::GetSlotForEntry(
649 u64 title_id, ContentRecordType type) const { 649 u64 title_id, ContentRecordType type) const {
650 for (const auto& [slot, provider] : providers) { 650 const auto iter =
651 if (provider == nullptr) 651 std::find_if(providers.begin(), providers.end(), [title_id, type](const auto& provider) {
652 continue; 652 return provider.second != nullptr && provider.second->HasEntry(title_id, type);
653 });
653 654
654 if (provider->HasEntry(title_id, type)) { 655 if (iter == providers.end()) {
655 return slot; 656 return std::nullopt;
656 }
657 } 657 }
658 658
659 return std::nullopt; 659 return iter->first;
660} 660}
661 661
662ManualContentProvider::~ManualContentProvider() = default; 662ManualContentProvider::~ManualContentProvider() = default;