1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-23 04:54:26 +00:00

Bugfix: -n should show GPU count, even though GPUs aren't probed yet

This commit is contained in:
Luke Dashjr 2012-01-19 23:27:38 -05:00
parent d9ccb3b485
commit daaa489d2c

3
main.c
View File

@ -1839,8 +1839,11 @@ static void load_default_config(void)
} }
#ifdef HAVE_OPENCL #ifdef HAVE_OPENCL
struct device_api opencl_api;
static char *print_ndevs_and_exit(int *ndevs) static char *print_ndevs_and_exit(int *ndevs)
{ {
opencl_api.api_detect();
printf("%i GPU devices detected\n", *ndevs); printf("%i GPU devices detected\n", *ndevs);
fflush(stdout); fflush(stdout);
exit(*ndevs); exit(*ndevs);