From: Lars Op den Kamp Date: Thu, 20 Sep 2012 15:23:55 +0000 (+0200) Subject: removed double check in cec-config X-Git-Tag: upstream/2.2.0~1^2~17^2~10 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=d2f9b488f5c2d8450b2f87082f9aef984670a747;p=deb_libcec.git removed double check in cec-config --- 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(); } }