HDMI CEC: Allow TV device type emulation. (#20310)

The previous check set device type default when HDMIType was set to CEC_Device::CDT_TV.
This commit is contained in:
DUPONCHEEL Sébastien 2023-12-25 12:42:20 +01:00 committed by GitHub
parent bb1e3cac97
commit d39896f6a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -65,7 +65,7 @@ void HdmiCecInit(void)
{
// CEC device type
CEC_Device::CEC_DEVICE_TYPE device_type = (CEC_Device::CEC_DEVICE_TYPE) Settings->hdmi_cec_device_type;
if (device_type == CEC_Device::CDT_TV || device_type >= CEC_Device::CDT_LAST) {
if (device_type < 0 || device_type >= CEC_Device::CDT_LAST) {
// if type in Settings is invalid, default to PLAYBACK_DEVICE
device_type = CEC_Device::CDT_PLAYBACK_DEVICE;
Settings->hdmi_cec_device_type = (uint8_t) device_type;