mirror of
https://github.com/jakcron/nstool
synced 2024-11-15 02:06:40 +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);
|
void setContentIndex(uint32_t index);
|
||||||
uint32_t getSdkAddonVersion() const;
|
uint32_t getSdkAddonVersion() const;
|
||||||
void setSdkAddonVersion(uint32_t version);
|
void setSdkAddonVersion(uint32_t version);
|
||||||
|
bool hasRightsId() const;
|
||||||
const byte_t* getRightsId() const;
|
const byte_t* getRightsId() const;
|
||||||
void setRightsId(const byte_t* rights_id);
|
void setRightsId(const byte_t* rights_id);
|
||||||
const fnd::List<sPartition>& getPartitions() const;
|
const fnd::List<sPartition>& getPartitions() const;
|
||||||
|
|
|
@ -219,6 +219,19 @@ void nx::NcaHeader::setSdkAddonVersion(uint32_t version)
|
||||||
mSdkAddonVersion = 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
|
const byte_t* nx::NcaHeader::getRightsId() const
|
||||||
{
|
{
|
||||||
return mRightsId;
|
return mRightsId;
|
||||||
|
|
Loading…
Reference in a new issue