From: Lars Op den Kamp Date: Mon, 12 Nov 2012 15:34:39 +0000 (+0100) Subject: fixed - request the active source before requesting device information in cec-client... X-Git-Tag: upstream/2.2.0~1^2~12^2~31 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=e4e827e620365d043ef94da8874d942f80aefb9b;p=deb_libcec.git fixed - request the active source before requesting device information in cec-client, or it'll display incorrect information when called the first time --- diff --git a/src/testclient/main.cpp b/src/testclient/main.cpp index d73d4cb..a1f3190 100644 --- a/src/testclient/main.cpp +++ b/src/testclient/main.cpp @@ -858,6 +858,7 @@ bool ProcessCommandSCAN(ICECAdapter *parser, const string &command, string & UNU strLog.append("CEC bus information\n===================\n"); cec_logical_addresses addresses = parser->GetActiveDevices(); + cec_logical_address activeSource = parser->GetActiveSource(); for (uint8_t iPtr = 0; iPtr < 16; iPtr++) { if (addresses[iPtr]) @@ -887,7 +888,6 @@ bool ProcessCommandSCAN(ICECAdapter *parser, const string &command, string & UNU } } - cec_logical_address activeSource = parser->GetActiveSource(); strLog.AppendFormat("currently active source: %s (%d)", parser->ToString(activeSource), (int)activeSource); PrintToStdOut(strLog);