mirror of
https://github.com/libretro/ppsspp.git
synced 2024-11-27 18:30:56 +00:00
Merge pull request #7090 from sum2012/MAC2
Fix Wrong MAC address by old version by "Change MAC address"
This commit is contained in:
commit
af3853f1f1
@ -244,7 +244,7 @@ const char *CreateRandMAC() {
|
||||
for(int i = 0; i < 6; i++) {
|
||||
value = rand() % 256;
|
||||
if (value >= 0 && value <= 15)
|
||||
randStream << '0' << value;
|
||||
randStream << '0' << std::hex << value;
|
||||
else
|
||||
randStream << std::hex << value;
|
||||
if (i<5) {
|
||||
@ -842,6 +842,11 @@ void Config::Load(const char *iniFileName, const char *controllerIniFilename) {
|
||||
#ifdef _WIN32
|
||||
iTempGPUBackend = iGPUBackend;
|
||||
#endif
|
||||
|
||||
// Fix Wrong MAC address by old version by "Change MAC address"
|
||||
std::string str(sMACAddress.c_str());
|
||||
if (str.length() != 17)
|
||||
sMACAddress = CreateRandMAC();
|
||||
}
|
||||
|
||||
void Config::Save() {
|
||||
|
Loading…
Reference in New Issue
Block a user