Browse Source

Save config options for GPUs only if there are GPU devices.

nfactor-troky
Con Kolivas 13 years ago
parent
commit
eee665895d
  1. 2
      main.c

2
main.c

@ -3099,6 +3099,7 @@ static void write_config(FILE *fcfg)
} }
fputs("\n],\n\n", fcfg); fputs("\n],\n\n", fcfg);
if (nDevs) {
/* Write GPU device values */ /* Write GPU device values */
fputs("\"intensity\" : \"", fcfg); fputs("\"intensity\" : \"", fcfg);
for(i = 0; i < nDevs; i++) for(i = 0; i < nDevs; i++)
@ -3130,6 +3131,7 @@ static void write_config(FILE *fcfg)
fprintf(fcfg, "%s%d", i > 0 ? "," : "", gpus[i].adl.targettemp); fprintf(fcfg, "%s%d", i > 0 ? "," : "", gpus[i].adl.targettemp);
#endif #endif
fputs("\",\n", fcfg); fputs("\",\n", fcfg);
}
fprintf(fcfg, "\n\"algo\" : \"%s\"", algo_names[opt_algo]); fprintf(fcfg, "\n\"algo\" : \"%s\"", algo_names[opt_algo]);
/* Simple bool and int options */ /* Simple bool and int options */

Loading…
Cancel
Save