Skip to content

Fix compilation with ddcutil 0.9.9

Johannes Jordan requested to merge ypnos/powerdevil:patch-ddcutil-0.9.9 into master

In ddcutil 0.9.9 the API was changed in a breaking way, see https://www.ddcutil.com/c_api_99/ for reference.

daemon/backends/upower/ddcutilbrightness.cpp:59:81: error: could not convert ‘& vcpList’ from ‘DDCA_Feature_List*’ to ‘DDCA_Feature_List’

The breaking line in the code is a not-that-helpful debug output message. As it is currently difficult to determine the installed ddcutil version (see https://github.com/rockowitz/ddcutil/issues/129), it is simply removed in this patch.

Example output with ddcutil 0.9.9:

powerdevil: Check for monitors using ddca_get_displays()...
powerdevil: [DDCutilBrightness]  2 display(s) were detected
powerdevil: Create a Display Identifier for display 0  :  EV2450
powerdevil: Opening the display reference, creating a display handle...
powerdevil: ddca_feature_list:  0x83,0x86,0x87,0x88,0x8c,0x8e,0x8f,0x91,0x93,0x94,0x96,0x98,0x99,0x9a,0x9b,0x9c,0x9d,0xa3,0xa4,0xa5,0xa7,0xa8,0xaa,0xac,0xae,0xc2,0xc3,0xc4,0xc5,0xc7,0xc9,0xcb,0xd1,0xd3,0xd4,0xd5,0xd6,0xda,0xde,0xe0,0xe4,0xe5,0xe7,0xe8,0xe9,0xea,0xeb,0xec,0xed,0xee
powerdevil: [DDCutilBrightness]: This monitor does not seem to support  16
powerdevil: Create a Display Identifier for display 1  :  DELL U2515H
powerdevil: Opening the display reference, creating a display handle...
powerdevil: ddca_feature_list:  0x83,0x86,0x87,0x88,0x8c,0x8e,0x8f,0x91,0x93,0x94,0x96,0x98,0x99,0x9a,0x9b,0x9c,0x9d,0xa3,0xa4,0xa5,0xa7,0xa8,0xaa,0xac,0xae,0xc2,0xc3,0xc4,0xc5,0xc7,0xc9,0xcb,0xd1,0xd3,0xd4,0xd5,0xd6,0xda,0xde,0xe0,0xe4,0xe5,0xe7,0xe8,0xe9,0xea,0xeb,0xec,0xed,0xee
powerdevil: [DDCutilBrightness]: This monitor supports  16
powerdevil: Display supports Brightness, adding handle to list
powerdevil: Using DDCutillib
powerdevil: [DDCutilBrightness::brightness]: ddca_get_vcp_value returned 0
powerdevil: Screen brightness value:  30
powerdevil: [DDCutilBrightness::brightnessMax]: ddca_get_vcp_value returned 0
powerdevil: Screen brightness value max:  100
powerdevil: current screen brightness value:  30
powerdevil: Backend ready, KDE Power Management system initialized

What is removed by this patch is the powerdevil: ddca_feature_list: … lines.

Merge request reports