#include <string.h>
#if defined(_WIN32) || defined(_WIN64)
-#define CDECL __cdecl
+#define CEC_CDECL __cdecl
#else
-#define CDECL
+#define CEC_CDECL
#endif
#if !defined(DECLSPEC)
#if defined(_WIN32) || defined(_WIN64)
#include <windows.h>
-#define CDECL __cdecl
#if defined DLL_EXPORT
#define DECLSPEC __declspec(dllexport)
#else
} cec_logical_addresses;
-typedef int (CDECL* CBCecLogMessageType)(void *param, const CEC::cec_log_message &);
-typedef int (CDECL* CBCecKeyPressType)(void *param, const cec_keypress &key);
-typedef int (CDECL* CBCecCommandType)(void *param, const cec_command &command);
+typedef int (CEC_CDECL* CBCecLogMessageType)(void *param, const CEC::cec_log_message &);
+typedef int (CEC_CDECL* CBCecKeyPressType)(void *param, const cec_keypress &key);
+typedef int (CEC_CDECL* CBCecCommandType)(void *param, const cec_command &command);
typedef struct ICECCallbacks
{
static COMMANDCB g_commandCB;
static ICECCallbacks g_cecCallbacks;
-int CecLogMessageCB(const cec_log_message &message)
+int CecLogMessageCB(void *cbParam, const cec_log_message &message)
{
if (g_logCB)
return g_logCB(message);
return 0;
}
-int CecKeyPressCB(const cec_keypress &key)
+int CecKeyPressCB(void *cbParam, const cec_keypress &key)
{
if (g_keyCB)
return g_keyCB(key);
return 0;
}
-int CecCommandCB(const cec_command &command)
+int CecCommandCB(void *cbParam, const cec_command &command)
{
if (g_commandCB)
return g_commandCB(command);
{
m_bHasCallbacks = true;
m_callbacks = callbacks;
- return m_libCec->EnableCallbacks(&g_cecCallbacks);
+ return m_libCec->EnableCallbacks(NULL, &g_cecCallbacks);
}
return false;