Ticket #1492: DVD_menu_control.patch

File DVD_menu_control.patch, 2.6 KB (added by mythtv@…, 18 years ago)
  • tv_play.cpp

     
    21332133                handled = false;
    21342134        }
    21352135    }
    2136    
     2136
    21372137    if (recAdjustment)
    21382138    {
    21392139        for (unsigned int i = 0; i < actions.size(); i++)
     
    21982198        }
    21992199    }
    22002200
     2201    if (prbuffer->isDVD() && prbuffer->DVD()->IsInMenu())
     2202    {
     2203        for (unsigned int i = 0; i < actions.size(); i++)
     2204        {
     2205            QString action = actions[i];
     2206
     2207            int nb_buttons = prbuffer->DVD()->NumMenuButtons();
     2208            if (nb_buttons > 0)
     2209            {
     2210                handled = true;
     2211
     2212                if (action == "UP" || action == "CHANNELUP")
     2213                    prbuffer->DVD()->MoveButtonUp();
     2214                else if (action == "DOWN" || action == "CHANNELDOWN")
     2215                    prbuffer->DVD()->MoveButtonDown();
     2216                else if (action == "LEFT" || action == "SEEKRWND")
     2217                    prbuffer->DVD()->MoveButtonLeft();
     2218                else if (action == "RIGHT" || action == "SEEKFFWD")
     2219                    prbuffer->DVD()->MoveButtonRight();
     2220                else if (action == "SELECT")
     2221                    nvp->ActivateDVDButton();
     2222                else
     2223                    handled = false;
     2224            }
     2225        }
     2226    }
     2227
    22012228#if DEBUG_ACTIONS
    22022229    for (uint i = 0; i < actions.size(); ++i)
    22032230        VERBOSE(VB_IMPORTANT, LOC + QString("handled(%1) actions[%2](%3)")
     
    26752702            QString action = actions[i];
    26762703            handled = true;
    26772704
    2678             if (prbuffer->isDVD() && prbuffer->DVD()->IsInMenu())
     2705            if (action == "DELETE")
    26792706            {
    2680                 int nb_buttons = prbuffer->DVD()->NumMenuButtons();
    2681                 if (nb_buttons > 0)
    2682                 {
    2683                     if (action == "UP" || action == "CHANNELUP")
    2684                         prbuffer->DVD()->MoveButtonUp();
    2685                     else if (action == "DOWN" || action == "CHANNELDOWN")
    2686                         prbuffer->DVD()->MoveButtonDown();
    2687                     else if (action == "LEFT" || action == "SEEKRWND")
    2688                         prbuffer->DVD()->MoveButtonLeft();
    2689                     else if (action == "RIGHT" || action == "SEEKFFWD")
    2690                         prbuffer->DVD()->MoveButtonRight();
    2691                     else if (action == "SELECT")
    2692                         nvp->ActivateDVDButton();
    2693                 }
    2694             }
    2695             else if (action == "DELETE")
    2696             {
    26972707                NormalSpeed();
    26982708                StopFFRew();
    26992709                nvp->SetBookmark();