Skip to content

Commit

Permalink
NWC24Config: Provide name for unk_04 config member
Browse files Browse the repository at this point in the history
According to WiiBrew this is a version number (thanks to Awesomebing1
for documenting this!)
  • Loading branch information
lioncash committed Aug 24, 2021
1 parent a60af19 commit 6268ee4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
12 changes: 6 additions & 6 deletions Source/Core/Core/IOS/Network/KD/NWC24Config.cpp
Expand Up @@ -59,7 +59,7 @@ void NWC24Config::ResetConfig()
memset(&m_data, 0, sizeof(m_data));

SetMagic(0x57634366);
SetUnk(8);
SetVersion(8);
SetCreationStage(NWC24CreationStage::Initial);
SetEnableBooting(0);
SetEmail("@wii.com");
Expand Down Expand Up @@ -110,7 +110,7 @@ s32 NWC24Config::CheckNwc24Config() const
return -14;
}

if (Unk() != 8)
if (Version() != 8)
return -27;

return 0;
Expand All @@ -126,14 +126,14 @@ void NWC24Config::SetMagic(u32 magic)
m_data.magic = Common::swap32(magic);
}

u32 NWC24Config::Unk() const
u32 NWC24Config::Version() const
{
return Common::swap32(m_data.unk_04);
return Common::swap32(m_data.version);
}

void NWC24Config::SetUnk(u32 unk_04)
void NWC24Config::SetVersion(u32 version)
{
m_data.unk_04 = Common::swap32(unk_04);
m_data.version = Common::swap32(version);
}

u32 NWC24Config::IdGen() const
Expand Down
8 changes: 4 additions & 4 deletions Source/Core/Core/IOS/Network/KD/NWC24Config.h
Expand Up @@ -47,8 +47,8 @@ class NWC24Config final
u32 Magic() const;
void SetMagic(u32 magic);

u32 Unk() const;
void SetUnk(u32 unk_04);
u32 Version() const;
void SetVersion(u32 version);

u32 IdGen() const;
void SetIdGen(u32 id_generation);
Expand Down Expand Up @@ -85,8 +85,8 @@ class NWC24Config final
#pragma pack(push, 1)
struct ConfigData final
{
u32 magic; // 'WcCf' 0x57634366
u32 unk_04; // must be 8
u32 magic; // 'WcCf' 0x57634366
u32 version; // must be 8
u64 nwc24_id;
u32 id_generation;
NWC24CreationStage creation_stage;
Expand Down

0 comments on commit 6268ee4

Please sign in to comment.