Skip to content

Commit

Permalink
Improve GPU Detect
Browse files Browse the repository at this point in the history
  • Loading branch information
MrPlusGH committed Feb 9, 2021
1 parent fd1b1be commit b61a598
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions NPlusMiner.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,7 @@ $MainForm.add_Shown({
# Added DetectedGPU in 7.8.0 to store GPU details in Config
If ($Config.DetectedGPU.Count -eq 0 -or $Config.GPUCount -eq $null -or $Config.GPUCount -lt 1){
If ($Config -eq $null){$Config = [hashtable]::Synchronized(@{})}
$DetectedGPU = DetectGPUCount
$DetectedGPU = @(DetectGPUCount)
$Config | Add-Member -Force @{DetectedGPU = $DetectedGPU}
$Config | Add-Member -Force @{GPUCount = $DetectedGPU.Count}
$TBGPUCount.Text = $Config.GPUCount
Expand Down Expand Up @@ -1383,9 +1383,11 @@ $TabControl.Controls.AddRange(@($RunPage, $SwitchingPage, $ConfigPage, $Monitori
$ButtonDetectGPU.Font = 'Microsoft Sans Serif,10'
$ConfigPageControls += $ButtonDetectGPU

$DetectedGPU = DetectGPUCount
$Config | Add-Member -Force @{DetectedGPU = $DetectedGPU}
$ButtonDetectGPU.Add_Click({$TBGPUCount.text = $DetectedGPU.Count})
$ButtonDetectGPU.Add_Click({
$DetectedGPU = @(DetectGPUCount)
$Config | Add-Member -Force @{DetectedGPU = $DetectedGPU}
$TBGPUCount.text = $DetectedGPU.Count
})

$LabelAlgos = New-Object system.Windows.Forms.Label
$LabelAlgos.text = "Algorithm"
Expand Down

0 comments on commit b61a598

Please sign in to comment.