From: Lars Op den Kamp Date: Thu, 12 Jan 2012 21:01:44 +0000 (+0100) Subject: cec: fix win32 compilation (new parameter) X-Git-Tag: upstream/2.2.0~1^2~41^2~1 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=77398db9d0f1b775ce5b1ba6b1965ec8cd289468;p=deb_libcec.git cec: fix win32 compilation (new parameter) --- 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;