From 77398db9d0f1b775ce5b1ba6b1965ec8cd289468 Mon Sep 17 00:00:00 2001 From: Lars Op den Kamp Date: Thu, 12 Jan 2012 22:01:44 +0100 Subject: [PATCH] cec: fix win32 compilation (new parameter) --- include/cectypes.h | 11 +++++------ src/LibCecSharp/LibCecSharp.cpp | 8 ++++---- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/include/cectypes.h b/include/cectypes.h index 1c52cb7..ce09d83 100644 --- a/include/cectypes.h +++ b/include/cectypes.h @@ -38,15 +38,14 @@ #include #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 -#define CDECL __cdecl #if defined DLL_EXPORT #define DECLSPEC __declspec(dllexport) #else @@ -874,9 +873,9 @@ typedef struct cec_logical_addresses } 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 { diff --git a/src/LibCecSharp/LibCecSharp.cpp b/src/LibCecSharp/LibCecSharp.cpp index 58e2446..3aa1253 100644 --- a/src/LibCecSharp/LibCecSharp.cpp +++ b/src/LibCecSharp/LibCecSharp.cpp @@ -525,21 +525,21 @@ static KEYCB g_keyCB; 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); @@ -641,7 +641,7 @@ public: { m_bHasCallbacks = true; m_callbacks = callbacks; - return m_libCec->EnableCallbacks(&g_cecCallbacks); + return m_libCec->EnableCallbacks(NULL, &g_cecCallbacks); } return false; -- 2.34.1