Merge pull request #2322 from MerryMage/ctx-mnu
game_list: Add a context menu with "Open Save Location" option
This commit is contained in:
commit
acc83a1c32
10 changed files with 87 additions and 4 deletions
|
@ -90,4 +90,9 @@ ResultVal<ArchiveFormatInfo> ArchiveSource_SDSaveData::GetFormatInfo(u64 program
|
|||
return MakeResult<ArchiveFormatInfo>(info);
|
||||
}
|
||||
|
||||
std::string ArchiveSource_SDSaveData::GetSaveDataPathFor(const std::string& mount_point,
|
||||
u64 program_id) {
|
||||
return GetSaveDataPath(GetSaveDataContainerPath(mount_point), program_id);
|
||||
}
|
||||
|
||||
} // namespace FileSys
|
||||
|
|
|
@ -23,6 +23,8 @@ public:
|
|||
ResultCode Format(u64 program_id, const FileSys::ArchiveFormatInfo& format_info);
|
||||
ResultVal<ArchiveFormatInfo> GetFormatInfo(u64 program_id) const;
|
||||
|
||||
static std::string GetSaveDataPathFor(const std::string& mount_point, u64 program_id);
|
||||
|
||||
private:
|
||||
std::string mount_point;
|
||||
};
|
||||
|
|
|
@ -143,6 +143,15 @@ public:
|
|||
return ResultStatus::ErrorNotImplemented;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the program id of the application
|
||||
* @param out_program_id Reference to store program id into
|
||||
* @return ResultStatus result of function
|
||||
*/
|
||||
virtual ResultStatus ReadProgramId(u64& out_program_id) {
|
||||
return ResultStatus::ErrorNotImplemented;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the RomFS of the application
|
||||
* Since the RomFS can be huge, we return a file reference instead of copying to a buffer
|
||||
|
|
|
@ -344,6 +344,18 @@ ResultStatus AppLoader_NCCH::ReadLogo(std::vector<u8>& buffer) {
|
|||
return LoadSectionExeFS("logo", buffer);
|
||||
}
|
||||
|
||||
ResultStatus AppLoader_NCCH::ReadProgramId(u64& out_program_id) {
|
||||
if (!file.IsOpen())
|
||||
return ResultStatus::Error;
|
||||
|
||||
ResultStatus result = LoadExeFS();
|
||||
if (result != ResultStatus::Success)
|
||||
return result;
|
||||
|
||||
out_program_id = ncch_header.program_id;
|
||||
return ResultStatus::Success;
|
||||
}
|
||||
|
||||
ResultStatus AppLoader_NCCH::ReadRomFS(std::shared_ptr<FileUtil::IOFile>& romfs_file, u64& offset,
|
||||
u64& size) {
|
||||
if (!file.IsOpen())
|
||||
|
|
|
@ -219,6 +219,13 @@ public:
|
|||
*/
|
||||
ResultStatus ReadLogo(std::vector<u8>& buffer) override;
|
||||
|
||||
/**
|
||||
* Get the program id of the application
|
||||
* @param out_program_id Reference to store program id into
|
||||
* @return ResultStatus result of function
|
||||
*/
|
||||
ResultStatus ReadProgramId(u64& out_program_id) override;
|
||||
|
||||
/**
|
||||
* Get the RomFS of the application
|
||||
* @param romfs_file Reference to buffer to store data
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue