mirror of
https://github.com/jakcron/nstool
synced 2024-11-14 17:56:39 +00:00
[nx] Add hasRightsId() to NcaHeader
This commit is contained in:
parent
bf1273e5ba
commit
3cbcba2bde
2 changed files with 14 additions and 0 deletions
|
@ -83,6 +83,7 @@ namespace nx
|
|||
void setContentIndex(uint32_t index);
|
||||
uint32_t getSdkAddonVersion() const;
|
||||
void setSdkAddonVersion(uint32_t version);
|
||||
bool hasRightsId() const;
|
||||
const byte_t* getRightsId() const;
|
||||
void setRightsId(const byte_t* rights_id);
|
||||
const fnd::List<sPartition>& getPartitions() const;
|
||||
|
|
|
@ -219,6 +219,19 @@ void nx::NcaHeader::setSdkAddonVersion(uint32_t version)
|
|||
mSdkAddonVersion = version;
|
||||
}
|
||||
|
||||
bool nx::NcaHeader::hasRightsId() const
|
||||
{
|
||||
bool rightsIdIsSet = false;
|
||||
|
||||
for (size_t i = 0; i < nca::kRightsIdLen; i++)
|
||||
{
|
||||
if (mRightsId[i] != 0)
|
||||
rightsIdIsSet = true;
|
||||
}
|
||||
|
||||
return rightsIdIsSet;
|
||||
}
|
||||
|
||||
const byte_t* nx::NcaHeader::getRightsId() const
|
||||
{
|
||||
return mRightsId;
|
||||
|
|
Loading…
Reference in a new issue