Browse Source

Added new SystemStats::getDeviceManufacturer()

tags/2021-05-28
hogliux 7 years ago
parent
commit
d8d2f5d0f4
6 changed files with 26 additions and 0 deletions
  1. +1
    -0
      examples/Demo/Source/Demos/SystemInfoDemo.cpp
  2. +5
    -0
      modules/juce_core/native/juce_android_SystemStats.cpp
  3. +5
    -0
      modules/juce_core/native/juce_linux_SystemStats.cpp
  4. +5
    -0
      modules/juce_core/native/juce_mac_SystemStats.mm
  5. +5
    -0
      modules/juce_core/native/juce_win32_SystemStats.cpp
  6. +5
    -0
      modules/juce_core/system/juce_SystemStats.h

+ 1
- 0
examples/Demo/Source/Demos/SystemInfoDemo.cpp View File

@@ -116,6 +116,7 @@ static String getAllSystemInfo()
<< "Operating system: " << SystemStats::getOperatingSystemName() << newLine
<< "Host name: " << SystemStats::getComputerName() << newLine
<< "Device type: " << SystemStats::getDeviceDescription() << newLine
<< "Manufacturer: " << SystemStats::getDeviceManufacturer() << newLine
<< "User logon name: " << SystemStats::getLogonName() << newLine
<< "Full user name: " << SystemStats::getFullUserName() << newLine
<< "User region: " << SystemStats::getUserRegion() << newLine


+ 5
- 0
modules/juce_core/native/juce_android_SystemStats.cpp View File

@@ -380,6 +380,11 @@ String SystemStats::getDeviceDescription()
+ "-" + AndroidStatsHelpers::getAndroidOsBuildValue ("SERIAL");
}
String SystemStats::getDeviceManufacturer()
{
return AndroidStatsHelpers::getAndroidOsBuildValue ("MANUFACTURER");
}
bool SystemStats::isOperatingSystem64Bit()
{
#if JUCE_64BIT


+ 5
- 0
modules/juce_core/native/juce_linux_SystemStats.cpp View File

@@ -60,6 +60,11 @@ String SystemStats::getDeviceDescription()
return getCpuInfo ("Hardware");
}
String SystemStats::getDeviceManufacturer()
{
return {};
}
String SystemStats::getCpuVendor()
{
auto v = getCpuInfo ("vendor_id");


+ 5
- 0
modules/juce_core/native/juce_mac_SystemStats.mm View File

@@ -153,6 +153,11 @@ String SystemStats::getDeviceDescription()
#endif
}
String SystemStats::getDeviceManufacturer()
{
return "Apple";
}
bool SystemStats::isOperatingSystem64Bit()
{
#if JUCE_IOS


+ 5
- 0
modules/juce_core/native/juce_win32_SystemStats.cpp View File

@@ -253,6 +253,11 @@ String SystemStats::getDeviceDescription()
#endif
}
String SystemStats::getDeviceManufacturer()
{
return {};
}
bool SystemStats::isOperatingSystem64Bit()
{
#if JUCE_64BIT


+ 5
- 0
modules/juce_core/system/juce_SystemStats.h View File

@@ -129,6 +129,11 @@ public:
*/
static String getDeviceDescription();
/** This will attempt to return the manufacturer of the device.
If no description is available, it'll just return an empty string.
*/
static String getDeviceManufacturer();
/** This method calculates some IDs to uniquely identify the device.
The first choice for an ID is a filesystem ID for the user's home folder or


Loading…
Cancel
Save