+void CCECClient::SetSupportedDeviceTypes(void)
+{
+ cec_device_type_list types;
+ types.Clear();
+
+ // get the command handler for the tv
+ CCECCommandHandler *tvHandler = m_processor->GetTV()->GetHandler();
+ if (!tvHandler)
+ return;
+
+ // check all device types
+ for (uint8_t iPtr = 0; iPtr < 5; iPtr++)
+ {
+ if (m_configuration.deviceTypes.types[iPtr] == CEC_DEVICE_TYPE_RESERVED)
+ continue;
+
+ // get the supported device type. the handler will replace types it doesn't support by one it does support
+ cec_device_type type = tvHandler->GetReplacementDeviceType(m_configuration.deviceTypes.types[iPtr]);
+ if (!types.IsSet(type))
+ types.Add(type);
+ }
+
+ // set the new type list
+ m_configuration.deviceTypes = types;
+}
+