aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArisotura <thetotalworm@gmail.com>2023-11-03 21:33:13 +0100
committerArisotura <thetotalworm@gmail.com>2023-11-03 21:33:13 +0100
commitf188c2cf1a275dbe9d79683e3d66b765eb816804 (patch)
tree85b9e268964a832f179230a57d58c641d02f4c1f
parente4f4e94694f4e4aaac5b78704fee1c39f11dd034 (diff)
hopefully get the compiler to shut up
-rw-r--r--src/DSi_NWifi.cpp2
-rw-r--r--src/SPI.cpp4
-rw-r--r--src/SPI.h2
-rw-r--r--src/SPI_Firmware.cpp2
-rw-r--r--src/SPI_Firmware.h3
-rw-r--r--src/frontend/qt_sdl/ROMManager.cpp4
6 files changed, 8 insertions, 9 deletions
diff --git a/src/DSi_NWifi.cpp b/src/DSi_NWifi.cpp
index d95def5..76e707d 100644
--- a/src/DSi_NWifi.cpp
+++ b/src/DSi_NWifi.cpp
@@ -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]);
diff --git a/src/SPI.cpp b/src/SPI.cpp
index 8eb8b0e..8432b19 100644
--- a/src/SPI.cpp
+++ b/src/SPI.cpp
@@ -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
diff --git a/src/SPI.h b/src/SPI.h
index 4578ad5..2fde226 100644
--- a/src/SPI.h
+++ b/src/SPI.h
@@ -85,7 +85,7 @@ public:
void Release() override;
private:
- std::unique_ptr<Firmware> Firmware;
+ std::unique_ptr<class Firmware> Firmware;
u8 CurCmd;
diff --git a/src/SPI_Firmware.cpp b/src/SPI_Firmware.cpp
index 943a0b3..5507145 100644
--- a/src/SPI_Firmware.cpp
+++ b/src/SPI_Firmware.cpp
@@ -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;
diff --git a/src/SPI_Firmware.h b/src/SPI_Firmware.h
index ad66a0a..a264a6c 100644
--- a/src/SPI_Firmware.h
+++ b/src/SPI_Firmware.h
@@ -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;
diff --git a/src/frontend/qt_sdl/ROMManager.cpp b/src/frontend/qt_sdl/ROMManager.cpp
index 19ae954..8a54e05 100644
--- a/src/frontend/qt_sdl/ROMManager.cpp
+++ b/src/frontend/qt_sdl/ROMManager.cpp
@@ -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();
}