Browse Source

Added a list of IP addresses to the juce demo system info page.

tags/2021-05-28
jules 10 years ago
parent
commit
d16e5f4e80
1 changed files with 14 additions and 0 deletions
  1. +14
    -0
      extras/Demo/Source/Demos/SystemInfoDemo.cpp

+ 14
- 0
extras/Demo/Source/Demos/SystemInfoDemo.cpp View File

@@ -49,6 +49,19 @@ static String getFileSystemRoots()
return rootList.joinIntoString (", ");
}
static String getIPAddressList()
{
Array<IPAddress> addresses;
IPAddress::findAllAddresses (addresses);
String addressList;
for (int i = 0; i < addresses.size(); ++i)
addressList << " " << addresses[i].toString() << newLine;
return addressList;
}
static const char* getDisplayOrientation()
{
switch (Desktop::getInstance().getCurrentOrientation())
@@ -139,6 +152,7 @@ static String getAllSystemInfo()
.getBytesFreeOnVolume()) << newLine
<< newLine
<< getDisplayInfo() << newLine
<< "Network IP addresses: " << newLine << getIPAddressList() << newLine
<< "Network card MAC addresses: " << newLine << getMacAddressList() << newLine;
DBG (systemInfo);


Loading…
Cancel
Save