| @@ -42,11 +42,6 @@ String SystemStats::getOperatingSystemName() | |||||
| return "Linux"; | return "Linux"; | ||||
| } | } | ||||
| String SystemStats::getDeviceDescription() | |||||
| { | |||||
| return String(); | |||||
| } | |||||
| bool SystemStats::isOperatingSystem64Bit() | bool SystemStats::isOperatingSystem64Bit() | ||||
| { | { | ||||
| #if JUCE_64BIT | #if JUCE_64BIT | ||||
| @@ -66,16 +61,26 @@ namespace LinuxStatsHelpers | |||||
| File ("/proc/cpuinfo").readLines (lines); | File ("/proc/cpuinfo").readLines (lines); | ||||
| for (int i = lines.size(); --i >= 0;) // (NB - it's important that this runs in reverse order) | 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 lines[i].fromFirstOccurrenceOf (":", false, false).trim(); | ||||
| return String(); | return String(); | ||||
| } | } | ||||
| } | } | ||||
| String SystemStats::getDeviceDescription() | |||||
| { | |||||
| return LinuxStatsHelpers::getCpuInfo ("Hardware"); | |||||
| } | |||||
| String SystemStats::getCpuVendor() | 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() | int SystemStats::getCpuSpeedInMegaherz() | ||||