yuzi-co / Forager

Advanced multi-algo profit switching miner
GNU General Public License v3.0
24 stars 14 forks source link

Suggestion for a fix in Get_Mining_Types() #18

Closed VukaKun closed 6 years ago

VukaKun commented 6 years ago

I didn't want to do a pull request, because I'm not exactly sure what's going on, but in Include.ps1, line 436 says:

$OCLDevices = @($OCLPlatforms | ForEach-Object { [OpenCl.Device]::GetDeviceIDs($_, "GPU") })

However, in my system $OCLPlatforms[1] is an Intel CPU and OpenCL throws an error because the second parameter is hardcoded as "GPU". This is what I did to make it work:

$OCLDevices = @($OCLPlatforms | ForEach-Object { if($_.Vendor -like '*NVIDIA*' -or $_.vendor -like '*Advanced Micro Devices*'){ [OpenCl.Device]::GetDeviceIDs($_, "GPU") } else{[OpenCl.Device]::GetDeviceIDs($_, "CPU")} })

yuzi-co commented 6 years ago

fixed )