Fix Nvidia memory report where free and used memory were mixed (#499)

This commit is contained in:
M
2021-07-25 11:00:52 +02:00
committed by GitHub
parent 07beb4f98f
commit 91d9e81c07
@@ -444,17 +444,17 @@ namespace LibreHardwareMonitor.Hardware.Gpu
try
{
uint current = memoryInformation.CurrentAvailableDedicatedVideoMemoryInkB;
uint free = memoryInformation.CurrentAvailableDedicatedVideoMemoryInkB;
uint total = memoryInformation.DedicatedVideoMemoryInkB;
_memoryTotal.Value = total / 1024;
ActivateSensor(_memoryTotal);
_memoryUsed.Value = current / 1024;
ActivateSensor(_memoryUsed);
_memoryFree.Value = (total - current) / 1024;
_memoryFree.Value = free / 1024;
ActivateSensor(_memoryFree);
_memoryUsed.Value = (total - free) / 1024;
ActivateSensor(_memoryUsed);
}
catch (Exception e) when (e is NVIDIAApiException or NVIDIANotSupportedException)
{ }