From 20b50026caf8fad0a4616d399a28d56c4927d604 Mon Sep 17 00:00:00 2001 From: Rachel Bryk Date: Tue, 1 Jan 2013 10:29:00 -0500 Subject: [PATCH] Fix a merge conflict: all the cool kids just delete any code that doesn't automerge, without considering how easy it'd be to do manually. --- .../Src/IPC_HLE/WII_IPC_HLE_Device_net.cpp | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_net.cpp b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_net.cpp index 44680a6c61..26e0467cfe 100644 --- a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_net.cpp +++ b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_net.cpp @@ -277,6 +277,33 @@ bool CWII_IPC_HLE_Device_net_ncd_manage::IOCtlV(u32 _CommandAddress) case IOCTLV_NCD_GETWIRELESSMACADDRESS: INFO_LOG(WII_IPC_NET, "NET_NCD_MANAGE: IOCTLV_NCD_GETWIRELESSMACADDRESS"); + + if (!SConfig::GetInstance().m_WirelessMac.empty()) + { + int x = 0; + int tmpaddress[6]; + for (int i = 0; i < SConfig::GetInstance().m_WirelessMac.length() && x < 6; i++) + { + if (SConfig::GetInstance().m_WirelessMac[i] == ':' || SConfig::GetInstance().m_WirelessMac[i] == '-') + continue; + + std::stringstream ss; + ss << std::hex << SConfig::GetInstance().m_WirelessMac[i]; + if (SConfig::GetInstance().m_WirelessMac[i+1] != ':' && SConfig::GetInstance().m_WirelessMac[i+1] != '-') + { + ss << std::hex << SConfig::GetInstance().m_WirelessMac[i+1]; + i++; + } + ss >> tmpaddress[x]; + x++; + } + u8 address[6]; + for (int i = 0; i < 6;i++) + address[i] = tmpaddress[i]; + Memory::WriteBigEData(address, CommandBuffer.PayloadBuffer.at(1).m_Address, 4); + break; + } + Memory::WriteBigEData(default_address, CommandBuffer.PayloadBuffer.at(1).m_Address, sizeof(default_address)); break;