repositories
/
deb_libcec.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
03ae897
)
cec: make sure that a device is really powered on
author
Lars Op den Kamp
<lars@opdenkamp.eu>
Tue, 29 Nov 2011 00:55:09 +0000
(
01:55
+0100)
committer
Lars Op den Kamp
<lars@opdenkamp.eu>
Tue, 29 Nov 2011 00:55:09 +0000
(
01:55
+0100)
src/lib/devices/CECBusDevice.cpp
patch
|
blob
|
blame
|
history
diff --git
a/src/lib/devices/CECBusDevice.cpp
b/src/lib/devices/CECBusDevice.cpp
index 439fc05fbf01d27b677eab7f7828f8fabb98bec4..7fe92a451236ec893e89ef47fd213e5ae164fb56 100644
(file)
--- a/
src/lib/devices/CECBusDevice.cpp
+++ b/
src/lib/devices/CECBusDevice.cpp
@@
-99,7
+99,16
@@
bool CCECBusDevice::PowerOn(void)
cec_command::Format(command, GetMyLogicalAddress(), m_iLogicalAddress, CEC_OPCODE_IMAGE_VIEW_ON);
if (m_processor->Transmit(command))
{
- RequestPowerStatus();
+ {
+ CLockObject lock(&m_mutex);
+ m_powerStatus = CEC_POWER_STATUS_UNKNOWN;
+ }
+ cec_power_status status = GetPowerStatus();
+ if (status == CEC_POWER_STATUS_STANDBY || status == CEC_POWER_STATUS_UNKNOWN)
+ {
+ SendKeypress(CEC_USER_CONTROL_CODE_POWER, true);
+ return SendKeyRelease(false);
+ }
return true;
}