1
0
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:
Scott Dial 2011-09-26 19:58:47 -04:00
parent c54b0870a8
commit 760b0064d6

4
main.c
View File

@ -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. */