cec: use a 5ms read timeout in CUSBCECAdapterCommunication
authorLars Op den Kamp <lars@opdenkamp.eu>
Thu, 29 Mar 2012 09:54:06 +0000 (11:54 +0200)
committerLars Op den Kamp <lars@opdenkamp.eu>
Thu, 29 Mar 2012 09:54:06 +0000 (11:54 +0200)
src/lib/adapter/USBCECAdapterCommunication.cpp

index c1645d047e37a35791a55674585aec4594409947..8269d139885028dfe3d92955162667a0c754d2b4 100644 (file)
@@ -224,7 +224,7 @@ void *CUSBCECAdapterCommunication::Process(void)
   {
     {
       CLockObject lock(m_mutex);
-      ReadFromDevice(50);
+      ReadFromDevice(5);
       bCommandReceived = m_callback && Read(command, 0) && m_bInitialised;
     }
 
@@ -1026,7 +1026,6 @@ cec_datapacket CUSBCECAdapterCommunication::GetSetting(cec_adapter_messagecode m
     return retVal;
   }
 
-  Sleep(250); // TODO ReadFromDevice() isn't waiting for the timeout to pass on win32
   ReadFromDevice(CEC_DEFAULT_TRANSMIT_WAIT, iResponseLength + 3 /* start + msgcode + iResponseLength + end */);
   CCECAdapterMessage input;
   if (Read(input, 0))