Browse Source

Fix --scrypt being required before scrypt intensities on command line or not working at all via config files.

nfactor-troky
Con Kolivas 11 years ago
parent
commit
3e84a19cda
  1. 4
      driver-opencl.c
  2. 2
      miner.h

4
driver-opencl.c

@ -550,7 +550,7 @@ char *set_intensity(char *arg) @@ -550,7 +550,7 @@ char *set_intensity(char *arg)
else {
gpus[device].dynamic = false;
val = atoi(nextptr);
if (val < MIN_INTENSITY || val > MAX_INTENSITY)
if (val < MIN_INTENSITY || val > MAX_GPU_INTENSITY)
return "Invalid value passed to set intensity";
tt = &gpus[device].intensity;
*tt = val;
@ -564,7 +564,7 @@ char *set_intensity(char *arg) @@ -564,7 +564,7 @@ char *set_intensity(char *arg)
else {
gpus[device].dynamic = false;
val = atoi(nextptr);
if (val < MIN_INTENSITY || val > MAX_INTENSITY)
if (val < MIN_INTENSITY || val > MAX_GPU_INTENSITY)
return "Invalid value passed to set intensity";
tt = &gpus[device].intensity;

2
miner.h

@ -958,11 +958,13 @@ extern bool add_pool_details(struct pool *pool, bool live, char *url, char *user @@ -958,11 +958,13 @@ extern bool add_pool_details(struct pool *pool, bool live, char *url, char *user
#define MIN_INTENSITY_STR (opt_scrypt ? MIN_SCRYPT_INTENSITY_STR : MIN_SHA_INTENSITY_STR)
#define MAX_INTENSITY (opt_scrypt ? MAX_SCRYPT_INTENSITY : MAX_SHA_INTENSITY)
#define MAX_INTENSITY_STR (opt_scrypt ? MAX_SCRYPT_INTENSITY_STR : MAX_SHA_INTENSITY_STR)
#define MAX_GPU_INTENSITY MAX_SCRYPT_INTENSITY
#else
#define MIN_INTENSITY MIN_SHA_INTENSITY
#define MIN_INTENSITY_STR MIN_SHA_INTENSITY_STR
#define MAX_INTENSITY MAX_SHA_INTENSITY
#define MAX_INTENSITY_STR MAX_SHA_INTENSITY_STR
#define MAX_GPU_INTENSITY MAX_SHA_INTENSITY
#endif
extern bool hotplug_mode;

Loading…
Cancel
Save