Skip to content

Commit

Permalink
Merge pull request #131 from Lion-Craft/staging
Browse files Browse the repository at this point in the history
#130 Fixed NVAPI info when continuously refreshing
  • Loading branch information
Lion-Craft authored Nov 19, 2023
2 parents 1bc6b78 + b529014 commit 255e1ba
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions Tinyinfo/MainWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,9 @@ public void Getdata(bool loop)
// Network Adapter Info
LoadNetworkAdaptersData();

// GPU and NVAPI info
LoadVideoControllerData();

// TODO: Make better (This is just bad if were honest)
Thread.Sleep(maxRefresh);
} while (loop);
Expand Down Expand Up @@ -288,7 +291,7 @@ private void LoadVideoControllerData()
if (manufacturer[0].ToLower() == "nvidia" || manufacturer[1].ToLower() == "nvidia")
{
// Clear nvapi Textbox
nvapiOutputBox.Text = "";
WriteTextSafe("", "nvapiOutputBox");

// Set GPU ID to 0
int nvid = 0;
Expand Down Expand Up @@ -382,15 +385,17 @@ private void LoadVideoControllerData()
string currentVideoClock = $"\tVideo Decode Clockspeed (If available): {nvgpu.CurrentClockFrequencies.VideoDecodingClock.Frequency / 1000}MHz{nl}";

// Output GPU info
nvapiOutputBox.Text += gpuid + gpu + chip + cores + rops + shaders + graphicsBase + graphicsBoost + memoryBase + memoryBoost+ memoryBus + memorySize + memoryType + memoryManufacturer + memoryEcc + memoryEccOn + bios + bus + pcie + agp + fan + temp + currentGraphicsClock + currentMemoryClock + currentVideoClock;
AppendTextSafe(gpuid + gpu + chip + cores + rops + shaders + graphicsBase + graphicsBoost + memoryBase + memoryBoost + memoryBus + memorySize + memoryType + memoryManufacturer + memoryEcc + memoryEccOn + bios + bus + pcie + agp + fan + temp + currentGraphicsClock + currentMemoryClock + currentVideoClock, "nvapiOutputBox");

// Increment ID
nvid++;
ShowInfo("");
}
}
else
{
nvapiOutputBox.Text = "Non NVIDIA Graphics detected. Unable to Display NvAPI information.";
WriteTextSafe("Non NVIDIA Graphics detected. Unable to Display NvAPI information.", "nvapiOutputBox");
ShowInfo("");
}
}

Expand Down Expand Up @@ -627,6 +632,9 @@ private void ShowInfo(string text)
case "gpuOutputBox":
textBox = gpuOutputBox;
break;
case "nvapiOutputBox":
textBox = nvapiOutputBox;
break;
case "boardOutputBox":
textBox = boardOutputBox;
break;
Expand Down

0 comments on commit 255e1ba

Please sign in to comment.