mirror of
https://github.com/openhardwaremonitor/openhardwaremonitor
synced 2025-09-05 00:35:18 +00:00
Changed the RAM implementation (removed Microsoft.VisualBasic dependency which is not implemented in Mono) and added code to prevent RAM hardware from loading on Linux.
This commit is contained in:
@@ -8,12 +8,22 @@
|
||||
|
||||
*/
|
||||
|
||||
using System;
|
||||
|
||||
namespace OpenHardwareMonitor.Hardware.RAM {
|
||||
internal class RAMGroup : IGroup {
|
||||
|
||||
private IHardware[] hardware;
|
||||
|
||||
public RAMGroup(SMBIOS smbios, ISettings settings) {
|
||||
|
||||
// No implementation for RAM on Unix systems
|
||||
int p = (int)Environment.OSVersion.Platform;
|
||||
if ((p == 4) || (p == 128)) {
|
||||
hardware = new IHardware[0];
|
||||
return;
|
||||
}
|
||||
|
||||
string name;
|
||||
if (smbios.MemoryDevices.Length > 0) {
|
||||
name = smbios.MemoryDevices[0].ManufacturerName + " " +
|
||||
|
Reference in New Issue
Block a user