Browse Source

Added a SystemStats::getDeviceDescription() method.

tags/2021-05-28
jules 11 years ago
parent
commit
6018f1df3d
5 changed files with 31 additions and 2 deletions
  1. +5
    -0
      modules/juce_core/native/juce_android_SystemStats.cpp
  2. +5
    -0
      modules/juce_core/native/juce_linux_SystemStats.cpp
  3. +9
    -0
      modules/juce_core/native/juce_mac_SystemStats.mm
  4. +5
    -0
      modules/juce_core/native/juce_win32_SystemStats.cpp
  5. +7
    -2
      modules/juce_core/system/juce_SystemStats.h

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

@@ -192,6 +192,11 @@ String SystemStats::getOperatingSystemName()
return "Android " + AndroidStatsHelpers::getSystemProperty ("os.version");
}
String SystemStats::getDeviceDescription()
{
return String::empty;
}
bool SystemStats::isOperatingSystem64Bit()
{
#if JUCE_64BIT


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

@@ -42,6 +42,11 @@ String SystemStats::getOperatingSystemName()
return "Linux";
}
String SystemStats::getDeviceDescription()
{
return String::empty;
}
bool SystemStats::isOperatingSystem64Bit()
{
#if JUCE_64BIT


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

@@ -143,6 +143,15 @@ String SystemStats::getOperatingSystemName()
#endif
}
String SystemStats::getDeviceDescription()
{
#if JUCE_IOS
return nsStringToJuce ([[UIDevice currentDevice] model]);
#else
return String::empty;
#endif
}
bool SystemStats::isOperatingSystem64Bit()
{
#if JUCE_IOS


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

@@ -197,6 +197,11 @@ String SystemStats::getOperatingSystemName()
return name;
}
String SystemStats::getDeviceDescription()
{
return String::empty;
}
bool SystemStats::isOperatingSystem64Bit()
{
#if JUCE_64BIT


+ 7
- 2
modules/juce_core/system/juce_SystemStats.h View File

@@ -83,8 +83,7 @@ public:
*/
static String getOperatingSystemName();
/** Returns true if the OS is 64-bit, or false for a 32-bit OS.
*/
/** Returns true if the OS is 64-bit, or false for a 32-bit OS. */
static bool isOperatingSystem64Bit();
/** Returns an environment variable.
@@ -122,6 +121,12 @@ public:
*/
static String getDisplayLanguage();
/** This will attempt to return some kind of string describing the device.
If no description is available, it'll just return an empty string. You may
want to use this for things like determining the type of phone/iPad, etc.
*/
static String getDeviceDescription();
//==============================================================================
// CPU and memory information..


Loading…
Cancel
Save