diff -r 8b3b9b2e28e5 -r 51a15cf90d22 Hardware/Mainboard/Mainboard.cs --- a/Hardware/Mainboard/Mainboard.cs Sun Jun 06 11:07:57 2010 +0000 +++ b/Hardware/Mainboard/Mainboard.cs Sun Jun 06 14:44:53 2010 +0000 @@ -1,4 +1,4 @@ -/* +/* Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -48,6 +48,7 @@ private Image icon; private LPCIO lpcio; + private LMSensors lmSensors; private IHardware[] superIOHardware; public Mainboard() { @@ -69,8 +70,16 @@ } this.icon = Utilities.EmbeddedResources.GetImage("mainboard.png"); - this.lpcio = new LPCIO(); - ISuperIO[] superIO = lpcio.SuperIO; + ISuperIO[] superIO; + int p = (int)System.Environment.OSVersion.Platform; + if ((p == 4) || (p == 128)) { + this.lmSensors = new LMSensors(); + superIO = lmSensors.SuperIO; + } else { + this.lpcio = new LPCIO(); + superIO = lpcio.SuperIO; + } + superIOHardware = new IHardware[superIO.Length]; for (int i = 0; i < superIO.Length; i++) superIOHardware[i] = new SuperIOHardware(superIO[i], @@ -105,7 +114,10 @@ public void Update() { } - public void Close() { } + public void Close() { + if (lmSensors != null) + lmSensors.Close(); + } public IHardware[] SubHardware { get { return superIOHardware; }