From: Lars Op den Kamp Date: Tue, 23 Oct 2012 13:28:53 +0000 (+0200) Subject: fixed - don't try to set controlled mode when using firmware version 1 and crash... X-Git-Tag: upstream/2.2.0~1^2~13^2~13 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=431ceea8985bff73bfd349ae08823c9e7cc72594;p=deb_libcec.git fixed - don't try to set controlled mode when using firmware version 1 and crash. closes #76 --- diff --git a/src/lib/adapter/Pulse-Eight/USBCECAdapterCommands.cpp b/src/lib/adapter/Pulse-Eight/USBCECAdapterCommands.cpp index 717e7d3..9448068 100644 --- a/src/lib/adapter/Pulse-Eight/USBCECAdapterCommands.cpp +++ b/src/lib/adapter/Pulse-Eight/USBCECAdapterCommands.cpp @@ -104,6 +104,10 @@ uint16_t CUSBCECAdapterCommands::RequestFirmwareVersion(void) m_persistedConfiguration.iFirmwareVersion = 1; } + // firmware versions < 2 don't have an autonomous mode + if (m_persistedConfiguration.iFirmwareVersion < 2) + m_bControlledMode = true; + return m_persistedConfiguration.iFirmwareVersion; }