diff --git a/src/neutrino.cpp b/src/neutrino.cpp index 8948f3329..19672652f 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -126,7 +126,7 @@ #include #include -#include +#include #include #include #include @@ -2345,16 +2345,18 @@ CPipSetup * g_Pip0; extern CVideoSettings * videoSettings; //extern CMenuOptionStringChooser* tzSelect; -void CISendMessage(uint32_t msg, uint32_t data) +static void CSSendMessage(uint32_t msg, uint32_t data) { - g_RCInput->postMsg(msg, data); + if (g_RCInput) + g_RCInput->postMsg(msg, data); } int CNeutrinoApp::run(int argc, char **argv) { CmdParser(argc, argv); - init_cs_api(); + cs_api_init(); + cs_register_messenger(CSSendMessage); CHintBox * hintBox; @@ -2646,7 +2648,6 @@ int CNeutrinoApp::run(int argc, char **argv) hintBox->hide(); delete hintBox; - cDvbCi::getInstance()->SetHook(CISendMessage); RealRun(mainMenu); ExitRun(true); @@ -4746,7 +4747,8 @@ void stop_daemons(bool stopall) powerManager->Close(); delete powerManager; } - shutdown_cs_api(); + cs_deregister_messenger(); + cs_api_exit(); } }