Commit 1db6ab0b0137455482f94d31ad1781607de78e3f

Con Kolivas 2011-09-14T22:18:49

Set targetfan when fanspeed is set on parameters.

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/adl.c b/adl.c
index 430e4a1..61f182b 100644
--- a/adl.c
+++ b/adl.c
@@ -295,7 +295,7 @@ void init_adl(int nDevs)
 		ADL_Overdrive5_FanSpeed_Get(ga->iAdapterIndex, 0, &ga->DefFanSpeedValue);
 		if (gpus[gpu].gpu_fan) {
 			ADL_Overdrive5_FanSpeed_Get(ga->iAdapterIndex, 0, &ga->lpFanSpeedValue);
-			ga->lpFanSpeedValue.iFanSpeed = gpus[gpu].gpu_fan;
+			ga->targetfan = ga->lpFanSpeedValue.iFanSpeed = gpus[gpu].gpu_fan;
 			ga->lpFanSpeedValue.iFlags = ADL_DL_FANCTRL_FLAG_USER_DEFINED_SPEED;
 			ga->lpFanSpeedValue.iSpeedType = ADL_DL_FANCTRL_SPEED_TYPE_PERCENT;
 			applog(LOG_INFO, "Setting GPU %d fan speed to %d%%", gpu, gpus[gpu].gpu_fan);