mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2024-11-27 20:14:17 +01:00
am: Address review comments.
This commit is contained in:
parent
680c6e694d
commit
d67f119589
@ -5,8 +5,8 @@
|
||||
#pragma once
|
||||
|
||||
#include <array>
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
#include "common/common_types.h"
|
||||
#include "common/swap.h"
|
||||
@ -126,7 +126,7 @@ private:
|
||||
u32_be signature_type;
|
||||
std::vector<u8> tmd_signature;
|
||||
std::vector<ContentChunk> tmd_chunks;
|
||||
std::map<u16, size_t> content_index_to_index;
|
||||
std::unordered_map<u16, size_t> content_index_to_index;
|
||||
};
|
||||
|
||||
} // namespace FileSys
|
||||
|
@ -399,8 +399,12 @@ std::string GetTitleContentPath(Service::FS::MediaType media_type, u64 tid, u16
|
||||
u32 content_id = 0;
|
||||
FileSys::TitleMetadata tmd;
|
||||
if (tmd.Load(tmd_path) == Loader::ResultStatus::Success) {
|
||||
if(contentIndex && tmd.ContentIndexExists(index)) {
|
||||
index = tmd.ContentIndexToIndex(index);
|
||||
if(contentIndex) {
|
||||
if(tmd.ContentIndexExists(index)) {
|
||||
index = tmd.ContentIndexToIndex(index);
|
||||
} else {
|
||||
LOG_ERROR(Service_AM, "Attempted to get path for non-existent content index {:04x}.", index);
|
||||
}
|
||||
}
|
||||
|
||||
content_id = tmd.GetContentIDByIndex(index);
|
||||
@ -530,6 +534,8 @@ void Module::Interface::FindDLCContentInfos(Kernel::HLERequestContext& ctx) {
|
||||
u64 romfs_offset = 0;
|
||||
|
||||
if (!tmd.ContentIndexExists(content_requested[i])) {
|
||||
LOG_ERROR(Service_AM, "Attempted to get info for non-existent content index {:04x}.", content_requested[i]);
|
||||
|
||||
IPC::RequestBuilder rb = rp.MakeBuilder(1, 4);
|
||||
rb.Push<u32>(-1); // TODO: Find the right error code
|
||||
rb.PushMappedBuffer(content_requested_in);
|
||||
|
Loading…
Reference in New Issue
Block a user