Ticket #6315: 00-6315-mythwelcome-lircmenuhack.patch

File 00-6315-mythwelcome-lircmenuhack.patch, 881 bytes (added by Matthew Wire <devel@…>, 11 years ago)

Hack to disable menu if mythfrontend is running

  • mythtv/programs/mythwelcome/welcomedialog.cpp

     
    613613
    614614void WelcomeDialog::showMenu(void)
    615615{
     616    QString command = QString("ret=`ps cax | grep -c %1`; exit $ret")
     617        .arg("mythfrontend");
     618    bool res = myth_system(command,
     619                           MYTH_SYSTEM_DONT_BLOCK_LIRC |
     620                           MYTH_SYSTEM_DONT_BLOCK_JOYSTICK_MENU);
     621    // Hack to stop menu running if mythfrontend is running too
     622    // ret=num processes running (0 if not)
     623    if (res > 0)
     624        return;
     625
    616626    MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
    617627
    618628    m_menuPopup = new MythDialogBox("Menu", popupStack, "actionmenu");