Skip to content

Commit 4814146

Browse files
committed
Update DDR5 memory type detection
1 parent e991400 commit 4814146

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

Protest/Protocols/Wmi.cs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -295,12 +295,11 @@ public static Dictionary<string, string> WmiFetch(string host) {
295295
//ContentBuilderAddValue(moc, "MemoryType", "ram type", hash, new FormatMethodPtr(RamType));
296296
ContentBuilderAddValue(moc, "FormFactor", "ram form factor", data, new FormatMethodPtr(RamFormFactor));
297297

298-
if (smbiosType == "20" || smbiosType == "21" || smbiosType == "22" || smbiosType == "23" || smbiosType == "24" || smbiosType == "25" || smbiosType == "26") {
299-
data.Add("ram type", SMBIOSMemoryType(smbiosType));
300-
}
301-
else {
302-
data.Add("ram type", RamType(memoryType));
298+
string memoryTypeString = SMBIOSMemoryType(smbiosType);
299+
if (memoryTypeString == String.Empty || memoryTypeString == "Unknown") {
300+
memoryTypeString = RamType(memoryType);
303301
}
302+
data.Add("ram type", memoryTypeString);
304303

305304
}
306305
catch { }
@@ -722,6 +721,8 @@ private static string SMBIOSMemoryType(string value) {
722721
"24" => "DDR3",
723722
"25" => "FBD2",
724723
"26" => "DDR4",
724+
"28" => "DDR5",
725+
"34" => "DDR5",
725726
_ => String.Empty
726727
};
727728
}

0 commit comments

Comments
 (0)