mirror of
https://github.com/GOSTSec/sgminer
synced 2025-09-04 10:12:10 +00:00
Don't mess with GPU stuff if we don't have them.
This commit is contained in:
parent
c54b0870a8
commit
760b0064d6
4
main.c
4
main.c
@ -5344,6 +5344,7 @@ int main (int argc, char *argv[])
|
||||
} else
|
||||
chosen_kernel = KL_NONE;
|
||||
|
||||
#ifdef HAVE_OPENCL
|
||||
gpu_threads = nDevs * opt_g_threads;
|
||||
if (total_devices) {
|
||||
if (total_devices > nDevs)
|
||||
@ -5366,6 +5367,9 @@ int main (int argc, char *argv[])
|
||||
gpu_devices[i] = true;
|
||||
total_devices = nDevs;
|
||||
}
|
||||
#else
|
||||
gpu_threads = 0;
|
||||
#endif
|
||||
|
||||
if (!gpu_threads && !forced_n_threads) {
|
||||
/* Maybe they turned GPU off; restore default CPU threads. */
|
||||
|
Loading…
x
Reference in New Issue
Block a user