From 2b9a9d70b79d11b1d759da4b72070e8f787b8cec Mon Sep 17 00:00:00 2001 From: Johns Date: Mon, 18 Feb 2013 19:11:38 +0100 Subject: Enable lirc, when VDR remote is disabled. --- play.cpp | 5 +++-- player.c | 9 +++++++-- player.h | 2 ++ 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/play.cpp b/play.cpp index 8c9ecc9..5d089d1 100644 --- a/play.cpp +++ b/play.cpp @@ -60,7 +60,7 @@ static const char *MAINMENUENTRY = trNOOP("Play"); ////////////////////////////////////////////////////////////////////////////// static char ConfigHideMainMenuEntry; ///< hide main menu entry -static char ConfigDisableRemote; ///< disable remote during external play +char ConfigDisableRemote; ///< disable remote during external play static volatile int DoMakePrimary; ///< switch primary device to this @@ -1011,7 +1011,8 @@ eOSState cPlayMenu::ProcessKey(eKeys key) return osPlugin; // restart with OSD browser case osUser2: - Skins.Message(mtStatus, tr("Function not working yet, use 3 or 4")); + Skins.Message(mtStatus, + tr("Function not working yet, use 3 or 4")); return osContinue; case osUser5: // play audio cdrom diff --git a/player.c b/player.c index 4d2e2c4..ea52d97 100644 --- a/player.c +++ b/player.c @@ -278,7 +278,11 @@ static void PlayerExec(const char *filename) args[4] = "-ontop"; } args[5] = "-noborder"; - args[6] = "-nolirc"; + if (ConfigDisableRemote) { + args[6] = "-lirc"; + } else { + args[6] = "-nolirc"; + } args[7] = "-nojoystick"; // disable all unwanted inputs args[8] = "-noar"; args[9] = "-nomouseinput"; @@ -435,7 +439,7 @@ static void PlayerForkAndExec(const char *filename) /** ** Close pipes. */ -void PlaserClosePipes(void) +static void PlayerClosePipes(void) { if (ConfigUseSlave) { if (PlayerPipeIn[0] != -1) { @@ -752,6 +756,7 @@ void PlayerStop(void) } } PlayerPid = 0; + PlayerClosesPipe(); if (ConfigOsdOverlay) { DisableDummyDevice(); diff --git a/player.h b/player.h index 983e461..519ca62 100644 --- a/player.h +++ b/player.h @@ -99,6 +99,8 @@ extern "C" /// Browser root=start directory extern const char *ConfigBrowserRoot; + ///< Disable remote during external play + extern char ConfigDisableRemote; extern const char *X11DisplayName; ///< x11 display name extern char PlayerDvdNav; ///< dvdnav active extern char PlayerPaused; ///< player paused -- cgit v1.2.3