From 3e84a19cda1e5a6400d6e131f95c671e53569aaa Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Sun, 11 Aug 2013 15:10:27 +1000 Subject: [PATCH] Fix --scrypt being required before scrypt intensities on command line or not working at all via config files. --- driver-opencl.c | 4 ++-- miner.h | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/driver-opencl.c b/driver-opencl.c index 38995eb7..57df2dcc 100644 --- a/driver-opencl.c +++ b/driver-opencl.c @@ -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) 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; diff --git a/miner.h b/miner.h index f2cc84b7..61a082b2 100644 --- a/miner.h +++ b/miner.h @@ -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;