mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-07-04 23:31:19 +01:00
control_metadata: Add GetRawBytes function to NACP
Returns the raw bytes of the NACP file. Needed for GetApplicationControlData which returns the raw, unprocessed NACP to the game.
This commit is contained in:
parent
5d7167dfca
commit
b04e39107f
2 changed files with 7 additions and 0 deletions
|
@ -66,4 +66,10 @@ std::string NACP::GetVersionString() const {
|
||||||
return Common::StringFromFixedZeroTerminatedBuffer(raw->version_string.data(),
|
return Common::StringFromFixedZeroTerminatedBuffer(raw->version_string.data(),
|
||||||
raw->version_string.size());
|
raw->version_string.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::vector<u8> NACP::GetRawBytes() const {
|
||||||
|
std::vector<u8> out(sizeof(RawNACP));
|
||||||
|
std::memcpy(out.data(), raw.get(), sizeof(RawNACP));
|
||||||
|
return out;
|
||||||
|
}
|
||||||
} // namespace FileSys
|
} // namespace FileSys
|
||||||
|
|
|
@ -81,6 +81,7 @@ public:
|
||||||
u64 GetTitleId() const;
|
u64 GetTitleId() const;
|
||||||
u64 GetDLCBaseTitleId() const;
|
u64 GetDLCBaseTitleId() const;
|
||||||
std::string GetVersionString() const;
|
std::string GetVersionString() const;
|
||||||
|
std::vector<u8> GetRawBytes() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::unique_ptr<RawNACP> raw;
|
std::unique_ptr<RawNACP> raw;
|
||||||
|
|
Loading…
Reference in a new issue