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:
45b97de
)
cec: force update the device status in the background scan thread. only scan once...
author
Lars Op den Kamp
<lars@opdenkamp.eu>
Sun, 4 Dec 2011 20:26:06 +0000
(21:26 +0100)
committer
Lars Op den Kamp
<lars@opdenkamp.eu>
Sun, 4 Dec 2011 20:26:06 +0000
(21:26 +0100)
src/lib/CECProcessor.cpp
patch
|
blob
|
blame
|
history
diff --git
a/src/lib/CECProcessor.cpp
b/src/lib/CECProcessor.cpp
index 8e761b10e4b3edaf50fc633b475a9e568556be1e..11065ebfec6e5b6bb7198986825db3f93d8c9bd9 100644
(file)
--- a/
src/lib/CECProcessor.cpp
+++ b/
src/lib/CECProcessor.cpp
@@
-1270,19
+1270,26
@@
const char *CCECProcessor::ToString(const cec_vendor_id vendor)
void *CCECBusScan::Process(void)
{
CCECBusDevice *device(NULL);
void *CCECBusScan::Process(void)
{
CCECBusDevice *device(NULL);
+ int iCount(0);
while (!IsStopped())
{
while (!IsStopped())
{
-
for (unsigned int iPtr = 0; iPtr < 15 && !IsStopped(); iPtr++
)
+
if (iCount == 0
)
{
{
- device = m_processor->m_busDevices[iPtr];
- if (device && device->GetStatus() == CEC_DEVICE_STATUS_PRESENT)
+ for (unsigned int iPtr = 0; iPtr < 15 && !IsStopped(); iPtr++)
{
{
- if (!IsStopped())
- device->GetVendorId();
- Sleep(5);
+ device = m_processor->m_busDevices[iPtr];
+ if (device && device->GetStatus(true) == CEC_DEVICE_STATUS_PRESENT)
+ {
+ if (!IsStopped())
+ device->GetVendorId();
+ Sleep(5);
+ }
}
}
}
}
- Sleep(5000);
+
+ if (++iCount > 60)
+ iCount = 0;
+ Sleep(1000);
}
return NULL;
}
}
return NULL;
}