Ticket #3829: osd-multiple.3.diff

File osd-multiple.3.diff, 3.6 KB (added by wstewart@…, 15 years ago)

Updated for SVN 20471

  • libs/libmythtv/tv_play.cpp

    diff -Naurp -x '*.orig' mythtv-orig/libs/libmythtv/tv_play.cpp mythtv/libs/libmythtv/tv_play.cpp
    old new void TV::ToggleOSD(const PlayerContext * 
    68176817    bool is_prog_info_small_disp = osd->IsSetDisplaying("program_info_small");
    68186818    bool has_prog_info           = osd->HasSet("program_info");
    68196819    bool is_prog_info_disp       = osd->IsSetDisplaying("program_info");
     6820    bool has_prog_video          = osd->HasSet("program_info_video");
     6821    bool has_prog_small_video    = osd->HasSet("program_info_small_video");
     6822    bool has_prog_rec            = osd->HasSet("program_info_recording");
     6823    bool has_prog_small_rec      = osd->HasSet("program_info_small_recording");
     6824   
    68206825    ReturnOSDLock(ctx, osd);
    68216826
    68226827    ctx->LockPlayingInfo(__FILE__, __LINE__);
    void TV::ToggleOSD(const PlayerContext * 
    68246829    QString title = ctx->playingInfo->title;
    68256830    ctx->UnlockPlayingInfo(__FILE__, __LINE__);
    68266831
    6827     bool isDVD = (ctx->buffer && ctx->buffer->isDVD());
     6832    bool isDVD = (ctx->buffer && ctx->buffer->isDVD());       
     6833    bool is_video                = ctx->playingInfo->isVideo;
     6834    bool is_recording            = StateIsPlaying(ctx->GetState()) && !is_video;
     6835   
    68286836    if (isDVD && desc.isEmpty() && title.isEmpty())
    68296837    {
    68306838        // DVD toggles between status and nothing
    void TV::ToggleOSD(const PlayerContext * 
    68356843    }
    68366844    else if (is_status_disp)
    68376845    {
    6838         if (has_prog_info_small)
     6846        if (is_video && has_prog_small_video)
     6847            UpdateOSDProgInfo(ctx, "program_info_small_video"); 
     6848        else if (is_video && has_prog_video)
     6849            UpdateOSDProgInfo(ctx, "program_info_video"); 
     6850        else if (is_recording && has_prog_small_rec)
     6851            UpdateOSDProgInfo(ctx, "program_info_small_recording"); 
     6852        else if (is_recording && has_prog_video)
     6853            UpdateOSDProgInfo(ctx, "program_info_recording");                   
     6854        else if (has_prog_info_small)
    68396855            UpdateOSDProgInfo(ctx, "program_info_small");
    68406856        else
    68416857            UpdateOSDProgInfo(ctx, "program_info");
    void TV::ToggleOSD(const PlayerContext * 
    68436859    else if (is_prog_info_small_disp)
    68446860    {
    68456861        // If small is displaying, show long if we have it, else hide info
    6846         if (has_prog_info)
     6862        if (is_video && has_prog_video)
     6863            UpdateOSDProgInfo(ctx, "program_info_video");
     6864        if (is_recording && has_prog_rec)
     6865            UpdateOSDProgInfo(ctx, "program_info_recording");                   
     6866        else if (has_prog_info)
    68476867            UpdateOSDProgInfo(ctx, "program_info");
    68486868        else
    68496869            hideAll = true;
    void TV::ToggleOSD(const PlayerContext * 
    68626882    {
    68636883        // No status desired? Nothing is up, Display small if we have,
    68646884        // else display long
    6865         if (has_prog_info_small)
     6885        if (is_video && has_prog_small_video)
     6886            UpdateOSDProgInfo(ctx, "program_info_small_video");
     6887        if (is_video && has_prog_video)
     6888            UpdateOSDProgInfo(ctx, "program_info_video");
     6889        if (is_recording && has_prog_small_rec)
     6890            UpdateOSDProgInfo(ctx, "program_info_small_recording");
     6891        if (is_recording && has_prog_rec)
     6892            UpdateOSDProgInfo(ctx, "program_info_recording");           
     6893        else if (has_prog_info_small)
    68666894            UpdateOSDProgInfo(ctx, "program_info_small");
    68676895        else
    68686896            UpdateOSDProgInfo(ctx, "program_info");