cec: fix compilation on windows after interface changes
authorLars Op den Kamp <lars.opdenkamp@pulse-eight.com>
Thu, 29 Sep 2011 16:57:31 +0000 (18:57 +0200)
committerLars Op den Kamp <lars.opdenkamp@pulse-eight.com>
Thu, 29 Sep 2011 16:57:31 +0000 (18:57 +0200)
.gitignore
include/CECExportsCpp.h
src/lib/CECParser.cpp
src/testclient/main.cpp

index b6443c17c3afd6f00f17db2c76b0ecbe39e4a894..50135e77d4a88790c64d2652c830bcd90f0c00da 100644 (file)
@@ -22,9 +22,9 @@ libcec.exp
 libcec.ilk
 libcec.lib
 libcec.pdb
-testclient.exe
-testclient.ilk
-testclient.pdb
+cec-client.exe
+cec-client.ilk
+cec-client.pdb
 
 project/Debug/
 project/ipch/
index 996ec7fe3e479bc8a7dd769c896fc3307765f0f4..ec69a4bb8e946bb7e8c4a2643a901eff6c470fff 100644 (file)
@@ -133,7 +133,7 @@ static int g_iLibCECInstanceCount = 0;
  */
 inline CEC::ICECDevice *LoadLibCec(const char *strName, CEC::cec_logical_address iLogicalAddress = CEC::CECDEVICE_PLAYBACKDEVICE1, int iPhysicalAddress = CEC_DEFAULT_PHYSICAL_ADDRESS)
 {
-  typedef void* (__cdecl*_CreateLibCec)(const char *);
+  typedef void* (__cdecl*_CreateLibCec)(const char *, uint8_t, uint8_t);
   _CreateLibCec CreateLibCec;
 
   if (!g_libCEC)
index 8b89aa634b5e510aae599b4e71e688eb8ad95381..df2ce10c470100b940ee587748c1d501665cec07 100644 (file)
@@ -817,7 +817,7 @@ bool CCECParser::SetAckMask(uint16_t iMask)
   output.push_back(MSGSTART);
   PushEscaped(output, MSGCODE_SET_ACK_MASK);
   PushEscaped(output, iMask >> 8);
-  PushEscaped(output, iMask);
+  PushEscaped(output, (uint8_t)iMask);
   output.push_back(MSGEND);
 
   if (m_serialport->Write(output) == -1)
@@ -873,7 +873,7 @@ int CCECParser::FindDevices(std::vector<cec_device> &deviceList, const char *str
   return CCECDetect::FindDevices(deviceList, strDevicePath);
 }
 
-DECLSPEC void * CECCreate(const char *strDeviceName, CEC::cec_logical_address iLogicalAddress /* = CEC::CECDEVICE_PLAYBACKDEVICE1 */, int iPhysicalAddress /* = CEC_DEFAULT_PHYSICAL_ADDRESS */)
+DECLSPEC void * CECCreate(const char *strDeviceName, CEC::cec_logical_address iLogicalAddress /*= CEC::CECDEVICE_PLAYBACKDEVICE1 */, int iPhysicalAddress /* = CEC_DEFAULT_PHYSICAL_ADDRESS */)
 {
   return static_cast< void* > (new CCECParser(strDeviceName, iLogicalAddress, iPhysicalAddress));
 }
index bfbec5e7aada7061c2d370c99cf72135d38e5faf..d119aef768eda7bb017a192a573e4659e30bfc5a 100644 (file)
@@ -211,7 +211,6 @@ int main (int argc, char *argv[])
         else if (command == "la")
         {
           string strvalue;
-          int    iLogicalAddress;
           if (GetWord(input, strvalue))
           {
             parser->SetLogicalAddress((cec_logical_address) atoi(strvalue.c_str()));