diff options
Diffstat (limited to 'src/Wifi.cpp')
-rw-r--r-- | src/Wifi.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/Wifi.cpp b/src/Wifi.cpp index c5a67ab..7f57c4b 100644 --- a/src/Wifi.cpp +++ b/src/Wifi.cpp @@ -180,7 +180,6 @@ void DeInit() void Reset() { - using namespace SPI_Firmware; memset(RAM, 0, 0x2000); memset(IO, 0, 0x1000); @@ -220,15 +219,17 @@ void Reset() } #undef BBREG_FIXED - RFVersion = GetFirmware()->Header().RFChipType; + const Firmware* fw = NDS::SPI->GetFirmware(); + + RFVersion = fw->GetHeader().RFChipType; memset(RFRegs, 0, 4*0x40); - FirmwareConsoleType console = GetFirmware()->Header().ConsoleType; - if (console == FirmwareConsoleType::DS) + Firmware::FirmwareConsoleType console = fw->GetHeader().ConsoleType; + if (console == Firmware::FirmwareConsoleType::DS) IOPORT(0x000) = 0x1440; - else if (console == FirmwareConsoleType::DSLite) + else if (console == Firmware::FirmwareConsoleType::DSLite) IOPORT(0x000) = 0xC340; - else if (NDS::ConsoleType == 1 && console == FirmwareConsoleType::DSi) + else if (NDS::ConsoleType == 1 && console == Firmware::FirmwareConsoleType::DSi) IOPORT(0x000) = 0xC340; // DSi has the modern DS-wifi variant else { |