From d2f9b488f5c2d8450b2f87082f9aef984670a747 Mon Sep 17 00:00:00 2001 From: Lars Op den Kamp Date: Thu, 20 Sep 2012 17:23:55 +0200 Subject: [PATCH] removed double check in cec-config --- src/cec-config/cec-config.cpp | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/src/cec-config/cec-config.cpp b/src/cec-config/cec-config.cpp index 1f58ccb..29bdf59 100644 --- a/src/cec-config/cec-config.cpp +++ b/src/cec-config/cec-config.cpp @@ -294,20 +294,17 @@ bool PowerOnTV(uint64_t iTimeout = 60000) uint64_t iNow = GetTimeMs(); uint64_t iTarget = iNow + iTimeout; + currentTvPower = g_parser->GetDevicePowerStatus(CECDEVICE_TV); if (currentTvPower != CEC_POWER_STATUS_ON) { - currentTvPower = g_parser->GetDevicePowerStatus(CECDEVICE_TV); - if (currentTvPower != CEC_POWER_STATUS_ON) + PrintToStdOut("Sending 'power on' command to the TV\n=== Please wait ==="); + g_parser->PowerOnDevices(CECDEVICE_TV); + while (iTarget > iNow) { - PrintToStdOut("Sending 'power on' command to the TV\n=== Please wait ==="); - g_parser->PowerOnDevices(CECDEVICE_TV); - while (iTarget > iNow) - { - g_responseEvent.Wait((uint32_t)(iTarget - iNow)); - if (g_lastCommand == CEC_OPCODE_REQUEST_ACTIVE_SOURCE) - break; - iNow = GetTimeMs(); - } + g_responseEvent.Wait((uint32_t)(iTarget - iNow)); + if (g_lastCommand == CEC_OPCODE_REQUEST_ACTIVE_SOURCE) + break; + iNow = GetTimeMs(); } } -- 2.34.1