Skip to content

Commit

Permalink
sysscmem remove voltage
Browse files Browse the repository at this point in the history
  • Loading branch information
jxy-s committed Jan 8, 2025
1 parent eb80e07 commit 1d684b5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 24 deletions.
12 changes: 5 additions & 7 deletions SystemInformer/SystemInformer.rc
Original file line number Diff line number Diff line change
Expand Up @@ -1167,19 +1167,17 @@ BEGIN
LTEXT "Mapped writes",IDC_STATIC,119,156,68,8
RTEXT "Static",IDC_ZMAPPEDWRITEIO,180,156,42,8,SS_ENDELLIPSIS
PUSHBUTTON "&Empty",IDC_EMPTY,299,152,50,14
GROUPBOX "Hardware",IDC_STATIC,361,0,114,73
GROUPBOX "Hardware",IDC_STATIC,361,0,114,63
LTEXT "Slots used",IDC_STATIC,369,11,40,8
RTEXT "Static",IDC_ZMEMSLOTS_V,415,11,54,8,SS_ENDELLIPSIS
LTEXT "Form factor",IDC_STATIC,369,21,48,8
RTEXT "Static",IDC_ZMEMFORMFACTOR_V,419,21,50,8,SS_ENDELLIPSIS
LTEXT "Memory type",IDC_STATIC,369,31,48,8
RTEXT "Static",IDC_ZMEMTYPE_V,419,31,50,8,SS_ENDELLIPSIS
LTEXT "Technology",IDC_STATIC,369,41,48,8
RTEXT "Static",IDC_ZMEMTECHNOLOGY_V,419,41,50,8,SS_ENDELLIPSIS
LTEXT "Technology",IDC_STATIC,369,31,48,8
RTEXT "Static",IDC_ZMEMTECHNOLOGY_V,419,31,50,8,SS_ENDELLIPSIS
LTEXT "Memory type",IDC_STATIC,369,41,48,8
RTEXT "Static",IDC_ZMEMTYPE_V,419,41,50,8,SS_ENDELLIPSIS
LTEXT "Speed",IDC_STATIC,369,51,26,8
RTEXT "Static",IDC_ZMEMSPEED_V,397,51,72,8,SS_ENDELLIPSIS
LTEXT "Voltage",IDC_STATIC,369,61,30,8
RTEXT "Static",IDC_ZMEMVOLTAGE_V,399,61,70,8,SS_ENDELLIPSIS
END

IDD_SYSINFO_MEM DIALOGEX 0, 0, 316, 250
Expand Down
7 changes: 3 additions & 4 deletions SystemInformer/resource.h
Original file line number Diff line number Diff line change
Expand Up @@ -603,10 +603,9 @@
#define IDC_ZMEMTYPE_V 1448
#define IDC_ZMEMTECHNOLOGY_V 1449
#define IDC_ZMEMSPEED_V 1450
#define IDC_ZMEMVOLTAGE_V 1451
#define IDC_ZL1CACHE_V 1452
#define IDC_ZL2CACHE_V 1453
#define IDC_ZL3CACHE_V 1454
#define IDC_ZL1CACHE_V 1451
#define IDC_ZL2CACHE_V 1452
#define IDC_ZL3CACHE_V 1453
#define ID_HACKER_EXIT 40001
#define ID_PROCESS_DUMP_MINIMAL 40002
#define ID_PROCESS_DUMP_LIMITED 40003
Expand Down
13 changes: 0 additions & 13 deletions SystemInformer/sysscmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ static UCHAR MemoryFormFactor;
static UCHAR MemoryTechnology;
static UCHAR MemoryType;
static ULONG MemorySpeed;
static USHORT MemoryVoltage;

_Function_class_(PH_ENUM_SMBIOS_CALLBACK)
BOOLEAN NTAPI PhpSipMemorySMBIOSCallback(
Expand All @@ -139,7 +138,6 @@ BOOLEAN NTAPI PhpSipMemorySMBIOSCallback(
UCHAR formFactor = 0;
UCHAR memoryType = 0;
UCHAR technology = 0;
USHORT voltage = 0;
ULONG speed = 0;

if (Entry->Header.Type != SMBIOS_MEMORY_DEVICE_INFORMATION_TYPE)
Expand All @@ -165,11 +163,6 @@ BOOLEAN NTAPI PhpSipMemorySMBIOSCallback(
speed = Entry->MemoryDevice.ExtendedSpeed;
}

if (PH_SMBIOS_CONTAINS_FIELD(Entry, MemoryDevice, ConfiguredVoltage))
voltage = Entry->MemoryDevice.ConfiguredVoltage;
if (voltage == 0 && PH_SMBIOS_CONTAINS_FIELD(Entry, MemoryDevice, MaximumVoltage))
voltage = Entry->MemoryDevice.MaximumVoltage;

MemorySlotsTotal++;
if (Entry->MemoryDevice.Size.Value)
MemorySlotsUsed++;
Expand All @@ -178,7 +171,6 @@ BOOLEAN NTAPI PhpSipMemorySMBIOSCallback(
MemoryType = max(MemoryType, memoryType);
MemoryTechnology = max(MemoryTechnology, technology);
MemorySpeed = max(MemorySpeed, speed);
MemoryVoltage = max(MemoryVoltage, voltage);

return FALSE;
}
Expand All @@ -201,7 +193,6 @@ BOOLEAN PhSipMemorySectionCallback(
MemoryFormFactor = 0;
MemoryType = 0;
MemorySpeed = 0;
MemoryVoltage = 0;
PhEnumSMBIOS(PhpSipMemorySMBIOSCallback, NULL);
}
return TRUE;
Expand Down Expand Up @@ -1016,10 +1007,6 @@ VOID PhSipUpdateMemoryPanel(
PhInitFormatU(&format[0], MemorySpeed);
PhInitFormatS(&format[1], L" MT/s");
PhSetDialogItemText(MemoryPanel, IDC_ZMEMSPEED_V, PhaFormat(format, 2, 10)->Buffer);

PhInitFormatF(&format[0], (FLOAT)MemoryVoltage / 1000, 2);
PhInitFormatS(&format[1], L" V");
PhSetDialogItemText(MemoryPanel, IDC_ZMEMVOLTAGE_V, PhaFormat(format, 2, 10)->Buffer);
}

// Commit charge
Expand Down

0 comments on commit 1d684b5

Please sign in to comment.