diff --git a/modules/juce_core/native/juce_linux_SystemStats.cpp b/modules/juce_core/native/juce_linux_SystemStats.cpp index a2575a13a9..a98c490593 100644 --- a/modules/juce_core/native/juce_linux_SystemStats.cpp +++ b/modules/juce_core/native/juce_linux_SystemStats.cpp @@ -42,11 +42,6 @@ String SystemStats::getOperatingSystemName() return "Linux"; } -String SystemStats::getDeviceDescription() -{ - return String(); -} - bool SystemStats::isOperatingSystem64Bit() { #if JUCE_64BIT @@ -66,16 +61,26 @@ namespace LinuxStatsHelpers File ("/proc/cpuinfo").readLines (lines); for (int i = lines.size(); --i >= 0;) // (NB - it's important that this runs in reverse order) - if (lines[i].startsWithIgnoreCase (key)) + if (lines[i].upToFirstOccurrenceOf (":", false, false).trim().equalsIgnoreCase (key)) return lines[i].fromFirstOccurrenceOf (":", false, false).trim(); return String(); } } +String SystemStats::getDeviceDescription() +{ + return LinuxStatsHelpers::getCpuInfo ("Hardware"); +} + String SystemStats::getCpuVendor() { - return LinuxStatsHelpers::getCpuInfo ("vendor_id"); + String v (LinuxStatsHelpers::getCpuInfo ("vendor_id")); + + if (v.isEmpty()) + v = LinuxStatsHelpers::getCpuInfo ("model name"); + + return v; } int SystemStats::getCpuSpeedInMegaherz()