mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-02-08 14:58:36 +00:00
Fix Wrong MAC address by "Change MAC address"
Part 1 of 7088
This commit is contained in:
parent
cbef4fae26
commit
122c3b866e
@ -239,9 +239,15 @@ const char *DefaultLangRegion() {
|
||||
|
||||
const char *CreateRandMAC() {
|
||||
std::stringstream randStream;
|
||||
u32 value;
|
||||
srand(time(0));
|
||||
for(int i = 0; i < 6; i++) {
|
||||
randStream << std::hex << (rand() % 256); //generates each octet for the mac in hex format
|
||||
value = rand() % 256;
|
||||
if (value >= 0 && value <= 9) {
|
||||
randStream << '0' << value;
|
||||
}
|
||||
else
|
||||
randStream << std::hex << value;
|
||||
if (i<5) {
|
||||
randStream << ':'; //we need a : between every octet
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user