@@ -100,11 +100,9 @@ static const char* detectWithDdcci(FFBrightnessOptions* options, FFlist* result)
100100 FF_LIBRARY_LOAD_SYMBOL_MESSAGE (libddcutil , ddca_get_any_vcp_value_using_explicit_type )
101101 FF_LIBRARY_LOAD_SYMBOL_MESSAGE (libddcutil , ddca_free_any_vcp_value )
102102 FF_LIBRARY_LOAD_SYMBOL_MESSAGE (libddcutil , ddca_close_display )
103- FF_LIBRARY_LOAD_SYMBOL_MESSAGE (libddcutil , ddca_set_default_sleep_multiplier )
103+ FF_LIBRARY_LOAD_SYMBOL_MESSAGE (libddcutil , ddca_set_sleep_multiplier )
104104 libddcutil = NULL ; // Don't dlclose libddcutil. See https://github.com/rockowitz/ddcutil/issues/330
105105
106- ffddca_set_default_sleep_multiplier (options -> ddcciSleep / 40.0 );
107-
108106 FF_AUTO_FREE DDCA_Display_Info_List * infoList = NULL ;
109107 if (__builtin_expect (ffddca_get_display_info_list2 (false, & infoList ) < 0 , 0 ))
110108 return "ddca_get_display_info_list2(false, &infoList) failed" ;
@@ -119,6 +117,8 @@ static const char* detectWithDdcci(FFBrightnessOptions* options, FFlist* result)
119117 DDCA_Display_Handle handle ;
120118 if (ffddca_open_display2 (display -> dref , false, & handle ) >= 0 )
121119 {
120+ ffddca_set_sleep_multiplier (options -> ddcciSleep / 40.0 ); // As of ddcutil 1.5, it sets the sleep multiplier for open display on the current thread
121+
122122 DDCA_Any_Vcp_Value * vcpValue = NULL ;
123123 if (ffddca_get_any_vcp_value_using_explicit_type (handle , 0x10 /*brightness*/ , DDCA_NON_TABLE_VCP_VALUE , & vcpValue ) >= 0 )
124124 {
0 commit comments