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:
678e227
)
cec: don't scan the whole bus in CCECProcessor::IsActiveDeviceType()
author
Lars Op den Kamp
<lars@opdenkamp.eu>
Fri, 25 Nov 2011 11:48:26 +0000
(12:48 +0100)
committer
Lars Op den Kamp
<lars@opdenkamp.eu>
Fri, 25 Nov 2011 11:48:26 +0000
(12:48 +0100)
src/lib/CECProcessor.cpp
patch
|
blob
|
blame
|
history
diff --git
a/src/lib/CECProcessor.cpp
b/src/lib/CECProcessor.cpp
index 17e9fcbd1ceaa30fd831b1c4d4370b5bb2e6f318..e43d298fba3ddfac53c5639580d04be61af34daa 100644
(file)
--- a/
src/lib/CECProcessor.cpp
+++ b/
src/lib/CECProcessor.cpp
@@
-668,10
+668,12
@@
bool CCECProcessor::IsActiveDevice(cec_logical_address address)
bool CCECProcessor::IsActiveDeviceType(cec_device_type type)
{
- cec_logical_addresses activeDevices = GetActiveDevices();
for (unsigned int iPtr = 0; iPtr < 15; iPtr++)
- if (activeDevices.IsSet((cec_logical_address) iPtr) && m_busDevices[iPtr]->GetType() == type)
+ {
+ if (m_busDevices[iPtr]->GetType() == type && m_busDevices[iPtr]->GetStatus() == CEC_DEVICE_STATUS_PRESENT)
return true;
+ }
+
return false;
}