hopefully get the compiler to shut up

This commit is contained in:
Arisotura 2023-11-03 21:33:13 +01:00
parent e4f4e94694
commit f188c2cf1a
6 changed files with 8 additions and 9 deletions

View File

@ -163,7 +163,7 @@ void DSi_NWifi::Reset()
const Firmware* fw = NDS::SPI->GetFirmware();
MacAddress mac = fw->GetHeader().MacAddress;
MacAddress mac = fw->GetHeader().MacAddr;
Log(LogLevel::Info, "NWifi MAC: %02X:%02X:%02X:%02X:%02X:%02X\n",
mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);

View File

@ -98,7 +98,7 @@ void FirmwareMem::Reset()
// disable autoboot
//Firmware[userdata+0x64] &= 0xBF;
MacAddress mac = Firmware->GetHeader().MacAddress;
MacAddress mac = Firmware->GetHeader().MacAddr;
Log(LogLevel::Info, "MAC: %02X:%02X:%02X:%02X:%02X:%02X\n", mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);
// verify shit
@ -139,7 +139,7 @@ void FirmwareMem::SetupDirectBoot(bool dsi)
if (dsi)
{
for (u32 i = 0; i < 6; i += 2)
DSi::ARM9Write16(0x02FFFCF4, *(u16*)&header.MacAddress[i]); // MAC address
DSi::ARM9Write16(0x02FFFCF4, *(u16*)&header.MacAddr[i]); // MAC address
// checkme
DSi::ARM9Write16(0x02FFFCFA, header.EnabledChannels); // enabled channels

View File

@ -85,7 +85,7 @@ public:
void Release() override;
private:
std::unique_ptr<Firmware> Firmware;
std::unique_ptr<class Firmware> Firmware;
u8 CurCmd;

View File

@ -113,7 +113,7 @@ Firmware::FirmwareHeader::FirmwareHeader(int consoletype)
WifiConfigLength = 0x138;
Unused1 = 0;
memcpy(&Unused3, DEFAULT_UNUSED3, sizeof(DEFAULT_UNUSED3));
MacAddress = DEFAULT_MAC;
MacAddr = DEFAULT_MAC;
EnabledChannels = 0x3FFE;
memset(&Unknown2, 0xFF, sizeof(Unknown2));
RFChipType = RFChipType::Type3;

View File

@ -45,7 +45,6 @@ constexpr const char* const DEFAULT_SSID = "melonAP";
constexpr int EXTENDED_WIFI_SETTINGS_OFFSET = -0xA00;
using FirmwareIdentifier = std::array<u8, 4>;
using MacAddress = std::array<u8, 6>;
constexpr FirmwareIdentifier GENERATED_FIRMWARE_IDENTIFIER = {'M', 'E', 'L', 'N'};
@ -283,7 +282,7 @@ public:
u8 Unused3[6];
MacAddress MacAddress;
MacAddress MacAddr;
u16 EnabledChannels;

View File

@ -937,7 +937,7 @@ void LoadUserSettingsFromConfig(Firmware& firmware)
bool rep = false;
auto& header = firmware.GetHeader();
memcpy(&mac, header.MacAddress.data(), sizeof(MacAddress));
memcpy(&mac, header.MacAddr.data(), sizeof(MacAddress));
MacAddress configuredMac;
@ -961,7 +961,7 @@ void LoadUserSettingsFromConfig(Firmware& firmware)
if (rep)
{
mac[0] &= 0xFC; // ensure the MAC isn't a broadcast MAC
header.MacAddress = mac;
header.MacAddr = mac;
header.UpdateChecksum();
}