From 9e1bb0627faf1777bfe0db3d8810704422581b67 Mon Sep 17 00:00:00 2001 From: Aaron Plattner Date: Tue, 12 Feb 2008 21:29:00 -0800 Subject: 100.14.23 --- src/gtk+-2.x/ctkclocks.c | 25 ++++++++++++++++++------- src/libXNVCtrl/libXNVCtrl.a | Bin 143448 -> 17180 bytes 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/src/gtk+-2.x/ctkclocks.c b/src/gtk+-2.x/ctkclocks.c index 5bcf6fb..127b6bd 100644 --- a/src/gtk+-2.x/ctkclocks.c +++ b/src/gtk+-2.x/ctkclocks.c @@ -366,7 +366,7 @@ GtkWidget* ctk_clocks_new(NvCtrlAttributeHandle *handle, object = g_object_new(CTK_TYPE_CLOCKS, NULL); ctk_object = CTK_CLOCKS(object); - /* Cache the handke and configuration */ + /* Cache the handle and configuration */ ctk_object->handle = handle; ctk_object->ctk_config = ctk_config; @@ -864,6 +864,8 @@ static void overclocking_state_update_gui(CtkClocks *ctk_object) { ReturnStatus ret; int value; + NVCTRLAttributeValidValuesRec range_detection; + gboolean probing_optimal = TRUE; gboolean enabled; @@ -888,12 +890,21 @@ static void overclocking_state_update_gui(CtkClocks *ctk_object) */ if ( enabled ) { - ret = NvCtrlGetAttribute(ctk_object->handle, - NV_CTRL_GPU_OPTIMAL_CLOCK_FREQS_DETECTION_STATE, - &value); - if ( ret == NvCtrlSuccess ) - ctk_object->probing_optimal = - (value == NV_CTRL_GPU_OPTIMAL_CLOCK_FREQS_DETECTION_STATE_BUSY); + ret = NvCtrlGetValidAttributeValues(ctk_object->handle, + NV_CTRL_GPU_OPTIMAL_CLOCK_FREQS_DETECTION, + &range_detection); + if ( ret == NvCtrlSuccess ) { + ret = NvCtrlGetAttribute(ctk_object->handle, + NV_CTRL_GPU_OPTIMAL_CLOCK_FREQS_DETECTION_STATE, + &value); + if ( ret == NvCtrlSuccess ) { + probing_optimal = + (value == NV_CTRL_GPU_OPTIMAL_CLOCK_FREQS_DETECTION_STATE_BUSY); + } + ctk_object->probing_optimal = probing_optimal; + + ctk_object->auto_detection_available = TRUE; + } } /* Sync the gui to be able to modify the clocks */ diff --git a/src/libXNVCtrl/libXNVCtrl.a b/src/libXNVCtrl/libXNVCtrl.a index 9f1eef0..b4368fa 100644 Binary files a/src/libXNVCtrl/libXNVCtrl.a and b/src/libXNVCtrl/libXNVCtrl.a differ -- cgit v1.2.3