Browse Source

Convert fanspeed management to default on exit.

nfactor-troky
Con Kolivas 13 years ago
parent
commit
87ec3f4789
  1. 5
      adl.c

5
adl.c

@ -70,6 +70,7 @@ static ADL_OVERDRIVE5_POWERCONTROL_GET ADL_Overdrive5_PowerControl_Get;
static ADL_OVERDRIVE5_POWERCONTROL_SET ADL_Overdrive5_PowerControl_Set; static ADL_OVERDRIVE5_POWERCONTROL_SET ADL_Overdrive5_PowerControl_Set;
static ADL_ADAPTER_SPEED_GET ADL_Adapter_Speed_Get; static ADL_ADAPTER_SPEED_GET ADL_Adapter_Speed_Get;
static ADL_ADAPTER_SPEED_SET ADL_Adapter_Speed_Set; static ADL_ADAPTER_SPEED_SET ADL_Adapter_Speed_Set;
static ADL_OVERDRIVE5_FANSPEEDTODEFAULT_SET ADL_Overdrive5_FanSpeedToDefault_Set;
#if defined (LINUX) #if defined (LINUX)
static void *hDLL; // Handle to .so library static void *hDLL; // Handle to .so library
@ -132,6 +133,7 @@ void init_adl(int nDevs)
ADL_Overdrive5_PowerControl_Set = (ADL_OVERDRIVE5_POWERCONTROL_SET) GetProcAddress(hDLL, "ADL_Overdrive5_PowerControl_Set"); ADL_Overdrive5_PowerControl_Set = (ADL_OVERDRIVE5_POWERCONTROL_SET) GetProcAddress(hDLL, "ADL_Overdrive5_PowerControl_Set");
ADL_Adapter_Speed_Get = (ADL_ADAPTER_SPEED_GET) GetProcAddress(hDLL, "ADL_Adapter_Speed_Get"); ADL_Adapter_Speed_Get = (ADL_ADAPTER_SPEED_GET) GetProcAddress(hDLL, "ADL_Adapter_Speed_Get");
ADL_Adapter_Speed_Set = (ADL_ADAPTER_SPEED_SET) GetProcAddress(hDLL, "ADL_Adapter_Speed_Set"); ADL_Adapter_Speed_Set = (ADL_ADAPTER_SPEED_SET) GetProcAddress(hDLL, "ADL_Adapter_Speed_Set");
ADL_Overdrive5_FanSpeedToDefault_Set = (ADL_OVERDRIVE5_FANSPEEDTODEFAULT_SET) GetProcAddress(hDLL, "ADL_Overdrive5_FanSpeedToDefault_Set");
if (!ADL_Main_Control_Create || !ADL_Main_Control_Destroy || if (!ADL_Main_Control_Create || !ADL_Main_Control_Destroy ||
!ADL_Adapter_NumberOfAdapters_Get || !ADL_Adapter_AdapterInfo_Get || !ADL_Adapter_NumberOfAdapters_Get || !ADL_Adapter_AdapterInfo_Get ||
@ -142,7 +144,7 @@ void init_adl(int nDevs)
!ADL_Overdrive5_ODPerformanceLevels_Get || !ADL_Overdrive5_ODPerformanceLevels_Set || !ADL_Overdrive5_ODPerformanceLevels_Get || !ADL_Overdrive5_ODPerformanceLevels_Set ||
!ADL_Main_Control_Refresh || !ADL_Overdrive5_PowerControl_Get || !ADL_Main_Control_Refresh || !ADL_Overdrive5_PowerControl_Get ||
!ADL_Overdrive5_PowerControl_Set || !ADL_Adapter_Speed_Get || !ADL_Overdrive5_PowerControl_Set || !ADL_Adapter_Speed_Get ||
!ADL_Adapter_Speed_Set) { !ADL_Adapter_Speed_Set || !ADL_Overdrive5_FanSpeedToDefault_Set) {
applog(LOG_WARNING, "ATI ADL's API is missing"); applog(LOG_WARNING, "ATI ADL's API is missing");
return; return;
} }
@ -1087,6 +1089,7 @@ void clear_adl(nDevs)
ADL_Overdrive5_ODPerformanceLevels_Set(ga->iAdapterIndex, ga->DefPerfLev); ADL_Overdrive5_ODPerformanceLevels_Set(ga->iAdapterIndex, ga->DefPerfLev);
free(ga->DefPerfLev); free(ga->DefPerfLev);
ADL_Overdrive5_FanSpeed_Set(ga->iAdapterIndex, 0, &ga->DefFanSpeedValue); ADL_Overdrive5_FanSpeed_Set(ga->iAdapterIndex, 0, &ga->DefFanSpeedValue);
ADL_Overdrive5_FanSpeedToDefault_Set(ga->iAdapterIndex, 0);
} }
ADL_Main_Memory_Free ( (void **)&lpInfo ); ADL_Main_Memory_Free ( (void **)&lpInfo );

Loading…
Cancel
Save