UDS: Add non zero mac address to the shared page
Apparently several games check the shared page mac address and wifi link level values, and will refuse to start UDS if they are not correct. This change gives a default value (in case you aren't connected to a network) and will read the value from Room if you are connected.
This commit is contained in:
@ -83,6 +83,17 @@ void Init() {
|
||||
update_time_event =
|
||||
CoreTiming::RegisterEvent("SharedPage::UpdateTimeCallback", UpdateTimeCallback);
|
||||
CoreTiming::ScheduleEvent(0, update_time_event);
|
||||
|
||||
SetWifiLinkLevel(WifiLinkLevel::POOR);
|
||||
SetMacAddress(DefaultMac);
|
||||
}
|
||||
|
||||
void SetMacAddress(const MacAddress& addr) {
|
||||
std::memcpy(shared_page.wifi_macaddr, addr.data(), sizeof(MacAddress));
|
||||
}
|
||||
|
||||
void SetWifiLinkLevel(WifiLinkLevel level) {
|
||||
shared_page.wifi_link_level = static_cast<u8>(level);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
Reference in New Issue
Block a user