Ticket #2542: problem1_fix.diff

File problem1_fix.diff, 2.2 KB (added by skamithi, 14 years ago)

problem 1 is an issue where the size of the bitmap is different then the video dimensions. the first commit only took care of the width..need to also take care of the height as well.

  • NuppelVideoPlayer.cpp

     
    64686468        osd->HideSet("subtitles");
    64696469        osd->ClearAll("subtitles");
    64706470        subtitleLock.lock();
    6471         int h = highlightButton->h;
    6472         int w = highlightButton->w;
     6471        uint h = ringBuffer->DVD()->ButtonHeight();
     6472        uint w = ringBuffer->DVD()->ButtonWidth();
     6473        uint bitmapHeight = highlightButton->h;
     6474        uint bitmapWidth  = highlightButton->w;
    64736475        int linesize = highlightButton->linesize;
    64746476        int x1 = highlightButton->x;
    64756477        int y1 = highlightButton->y;
     
    64776479        uint btnY = ringBuffer->DVD()->ButtonPosY();
    64786480        subtitleOSD = osd->GetSet("subtitles");
    64796481
     6482        if ((w + x1) > bitmapWidth)
     6483            w = w - ((w + x1) - bitmapWidth);
     6484       
     6485        if ((h + y1) > bitmapHeight)
     6486            h = h - ((h + y1) - bitmapHeight);
     6487       
    64806488        QImage hl_button(w, h, 32);
    64816489        hl_button.setAlphaBuffer(true);
    6482         for (int y = 0; y < h; y++)
     6490        for (uint y = 0; y < h; y++)
    64836491        {
    6484             for (int x = 0; x < w; x++)
     6492            for (uint x = 0; x < w; x++)
    64856493            {
    6486                 if ((x+x1) >= linesize)
    6487                     break;
    64886494                uint8_t color = highlightButton->bitmap[(y+y1)*linesize+(x+x1)];
    64896495                uint32_t pixel = highlightButton->rgba_palette[color];
    64906496                hl_button.setPixel(x, y, pixel);
  • DVDRingBuffer.h

     
    5050    void ReleaseMenuButton(void);
    5151
    5252    bool IgnoringStillorWait(void) { return skipstillorwait; }
    53     uint ButtonPosX(void) { return hl_startx; }
    54     uint ButtonPosY(void) { return hl_starty; }
     53    uint ButtonPosX(void)   { return hl_startx; }
     54    uint ButtonPosY(void)   { return hl_starty; }
     55    uint ButtonWidth(void)  { return hl_width; }
     56    uint ButtonHeight(void) { return hl_height; }
    5557    uint GetAudioLanguage(int id);
    5658    uint GetSubtitleLanguage(int id);
    5759    void SetMenuPktPts(long long pts) { menupktpts = pts; }