fixed - request the active source before requesting device information in cec-client...
authorLars Op den Kamp <lars@opdenkamp.eu>
Mon, 12 Nov 2012 15:34:39 +0000 (16:34 +0100)
committerLars Op den Kamp <lars@opdenkamp.eu>
Mon, 12 Nov 2012 15:34:39 +0000 (16:34 +0100)
src/testclient/main.cpp

index d73d4cbe1a2b478cdaf20efc8c3042d69a9022a9..a1f319039a3dc7d8b6c908d7a69aacabc97c65e5 100644 (file)
@@ -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);