From: Lars Op den Kamp Date: Thu, 29 Sep 2011 16:57:31 +0000 (+0200) Subject: cec: fix compilation on windows after interface changes X-Git-Tag: upstream/2.2.0~1^2~318 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=bcd03b376090dafc233889bbf7405221d1a37cb0;p=deb_libcec.git cec: fix compilation on windows after interface changes --- diff --git a/.gitignore b/.gitignore index b6443c1..50135e7 100644 --- a/.gitignore +++ b/.gitignore @@ -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/ diff --git a/include/CECExportsCpp.h b/include/CECExportsCpp.h index 996ec7f..ec69a4b 100644 --- a/include/CECExportsCpp.h +++ b/include/CECExportsCpp.h @@ -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) diff --git a/src/lib/CECParser.cpp b/src/lib/CECParser.cpp index 8b89aa6..df2ce10 100644 --- a/src/lib/CECParser.cpp +++ b/src/lib/CECParser.cpp @@ -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 &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)); } diff --git a/src/testclient/main.cpp b/src/testclient/main.cpp index bfbec5e..d119aef 100644 --- a/src/testclient/main.cpp +++ b/src/testclient/main.cpp @@ -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()));