From e4e827e620365d043ef94da8874d942f80aefb9b Mon Sep 17 00:00:00 2001 From: Lars Op den Kamp Date: Mon, 12 Nov 2012 16:34:39 +0100 Subject: [PATCH] fixed - request the active source before requesting device information in cec-client, or it'll display incorrect information when called the first time --- src/testclient/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.34.1