repositories
/
deb_libcec.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge PR #20
[deb_libcec.git]
/
src
/
LibCecSharp
/
LibCecSharp.cpp
diff --git
a/src/LibCecSharp/LibCecSharp.cpp
b/src/LibCecSharp/LibCecSharp.cpp
index ff3c619f487694166c2ec37d23aa37763e446c67..0bae3eaca39e9d820f49b605968b6e39d78fa580 100644
(file)
--- a/
src/LibCecSharp/LibCecSharp.cpp
+++ b/
src/LibCecSharp/LibCecSharp.cpp
@@
-1,7
+1,7
@@
/*
* This file is part of the libCEC(R) library.
*
/*
* This file is part of the libCEC(R) library.
*
-* libCEC(R) is Copyright (C) 2011-201
2
Pulse-Eight Limited. All rights reserved.
+* libCEC(R) is Copyright (C) 2011-201
3
Pulse-Eight Limited. All rights reserved.
* libCEC(R) is an original work, containing original code.
*
* libCEC(R) is a trademark of Pulse-Eight Limited.
* libCEC(R) is an original work, containing original code.
*
* libCEC(R) is a trademark of Pulse-Eight Limited.
@@
-377,7
+377,7
@@
namespace CecSharp
for (uint8_t iPtr = 0; iPtr < 16; iPtr++)
if (activeDevices[iPtr])
for (uint8_t iPtr = 0; iPtr < 16; iPtr++)
if (activeDevices[iPtr])
- retVal->
Addresses[iDevices++] = (CecLogicalAddress)iPtr
;
+ retVal->
Set((CecLogicalAddress)iPtr)
;
return retVal;
}
return retVal;
}
@@
-474,7
+474,11
@@
namespace CecSharp
String ^ GetDeviceOSDName(CecLogicalAddress logicalAddress)
{
cec_osd_name osd = m_libCec->GetDeviceOSDName((cec_logical_address) logicalAddress);
String ^ GetDeviceOSDName(CecLogicalAddress logicalAddress)
{
cec_osd_name osd = m_libCec->GetDeviceOSDName((cec_logical_address) logicalAddress);
- return gcnew String(osd.name);
+ // we need to terminate with \0, and we only got 14 chars in osd.name
+ char strOsdName[15];
+ memset(strOsdName, 0, sizeof(strOsdName));
+ memcpy(strOsdName, osd.name, sizeof(osd.name));
+ return gcnew String(strOsdName);
}
/// <summary>
}
/// <summary>
@@
-822,6
+826,9
@@
namespace CecSharp
if (netConfig->ServerVersion >= CecServerVersion::Version1_8_0)
config.cecVersion = (cec_version)netConfig->CECVersion;
if (netConfig->ServerVersion >= CecServerVersion::Version1_8_0)
config.cecVersion = (cec_version)netConfig->CECVersion;
+ if (netConfig->ServerVersion >= CecServerVersion::Version2_1_0)
+ config.bPowerOnScreensaver = netConfig->PowerOnScreensaver ? 1 : 0;
+
config.callbacks = &g_cecCallbacks;
}
config.callbacks = &g_cecCallbacks;
}