configuration.bMonitorOnly = m_configuration.bMonitorOnly;
}
+ // client version 1.8.0
+ if (configuration.clientVersion >= CEC_CLIENT_VERSION_1_8_0)
+ configuration.cecVersion = m_configuration.cecVersion;
+
+ // client version 1.8.2
+ if (configuration.clientVersion >= CEC_CLIENT_VERSION_1_8_2)
+ configuration.adapterType = m_configuration.adapterType;
+
return true;
}
m_configuration.bMonitorOnly = configuration.bMonitorOnly;
}
+ // client version 1.8.0
+ if (configuration.clientVersion >= CEC_CLIENT_VERSION_1_8_0)
+ m_configuration.cecVersion = configuration.cecVersion;
+
+ // client version 1.8.2
+ if (configuration.clientVersion >= CEC_CLIENT_VERSION_1_8_2)
+ m_configuration.adapterType = configuration.adapterType;
+
// ensure that there is at least 1 device type set
if (m_configuration.deviceTypes.IsEmpty())
m_configuration.deviceTypes.Add(CEC_DEVICE_TYPE_RECORDING_DEVICE);
void CCECClient::AddKey(const cec_keypress &key)
{
+ // send back the previous key if there is one
+ AddKey();
+
{
CLockObject lock(m_mutex);
- m_iCurrentButton = key.duration > 0 ? CEC_USER_CONTROL_CODE_UNKNOWN : key.keycode;
+ m_iCurrentButton = key.duration > 0 || key.keycode > CEC_USER_CONTROL_CODE_MAX ?
+ CEC_USER_CONTROL_CODE_UNKNOWN :
+ key.keycode;
m_buttontime = key.duration > 0 ? 0 : GetTimeMs();
}