Browse Source

Bugfix: Initialise cutoff and target temperatures in allocate_cgpu if not initialised by the driver

Luke Dashjr 12 years ago
parent
commit
df802aed0c
1 changed files with 3 additions and 0 deletions
  1. 3 0
      miner.c

+ 3 - 0
miner.c

@@ -10597,6 +10597,9 @@ void allocate_cgpu(struct cgpu_info *cgpu, unsigned int *kp)
 
 
 	cgpu->max_hashes = 0;
 	cgpu->max_hashes = 0;
 	BFGINIT(cgpu->min_nonce_diff, 1);
 	BFGINIT(cgpu->min_nonce_diff, 1);
+	
+	BFGINIT(cgpu->cutofftemp, opt_cutofftemp);
+	BFGINIT(cgpu->targettemp, cgpu->cutofftemp - 6);
 
 
 	// Setup thread structs before starting any of the threads, in case they try to interact
 	// Setup thread structs before starting any of the threads, in case they try to interact
 	for (j = 0; j < threadobj; ++j, ++*kp) {
 	for (j = 0; j < threadobj; ++j, ++*kp) {