mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-27 23:42:58 +02:00
dvbsubtitle.cpp: fix wconversion compiler warnings
This commit is contained in:
@@ -119,7 +119,7 @@ void cDvbSubtitleBitmaps::Draw(int &min_x, int &min_y, int &max_x, int &max_y)
|
|||||||
double xc = (double) CFrameBuffer::getInstance()->getScreenWidth(true)/(double) 720;
|
double xc = (double) CFrameBuffer::getInstance()->getScreenWidth(true)/(double) 720;
|
||||||
double yc = (double) CFrameBuffer::getInstance()->getScreenHeight(true)/(double) 576;
|
double yc = (double) CFrameBuffer::getInstance()->getScreenHeight(true)/(double) 576;
|
||||||
xc = yc; //FIXME should we scale also to full width ?
|
xc = yc; //FIXME should we scale also to full width ?
|
||||||
int xf = xc * (double) 720;
|
int xf = int(xc * (double) 720);
|
||||||
|
|
||||||
for (i = 0; i < Count(); i++) {
|
for (i = 0; i < Count(); i++) {
|
||||||
uint32_t * colors = (uint32_t *) sub.rects[i]->pict.data[1];
|
uint32_t * colors = (uint32_t *) sub.rects[i]->pict.data[1];
|
||||||
@@ -127,15 +127,15 @@ void cDvbSubtitleBitmaps::Draw(int &min_x, int &min_y, int &max_x, int &max_y)
|
|||||||
int height = sub.rects[i]->h;
|
int height = sub.rects[i]->h;
|
||||||
int xoff, yoff;
|
int xoff, yoff;
|
||||||
|
|
||||||
int nw = width == 1280 ? ((double) width / xc) : ((double) width * xc);
|
int nw = int(width == 1280 ? ((double) width / xc) : ((double) width * xc));
|
||||||
int nh = (double) height * yc;
|
int nh = int((double) height * yc);
|
||||||
|
|
||||||
int xdiff = (wd > xf) ? ((wd - xf) / 2) : 0;
|
int xdiff = (wd > xf) ? ((wd - xf) / 2) : 0;
|
||||||
xoff = sub.rects[i]->x*xc + xstart + xdiff;
|
xoff = int(sub.rects[i]->x*xc + xstart + xdiff);
|
||||||
if(sub.rects[i]->y < 576/2) {
|
if(sub.rects[i]->y < 576/2) {
|
||||||
yoff = ystart + sub.rects[i]->y*yc;
|
yoff = int(ystart + sub.rects[i]->y*yc);
|
||||||
} else {
|
} else {
|
||||||
yoff = yend - ((width == 1280 ? 704:576) - (double) (sub.rects[i]->y + height))*yc - nh;
|
yoff = int(yend - ((width == 1280 ? 704:576) - (double) (sub.rects[i]->y + height))*yc - nh);
|
||||||
if(yoff < ystart)
|
if(yoff < ystart)
|
||||||
yoff = ystart;
|
yoff = ystart;
|
||||||
}
|
}
|
||||||
@@ -343,7 +343,7 @@ int cDvbSubtitleConverter::Action(void)
|
|||||||
bitmaps->Del(sb, true);
|
bitmaps->Del(sb, true);
|
||||||
}
|
}
|
||||||
else if (Delta < WaitMs)
|
else if (Delta < WaitMs)
|
||||||
WaitMs = (Delta > SHOW_DELTA) ? Delta - SHOW_DELTA : Delta;
|
WaitMs = int((Delta > SHOW_DELTA) ? Delta - SHOW_DELTA : Delta);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
bitmaps->Del(sb, true);
|
bitmaps->Del(sb, true);
|
||||||
|
Reference in New Issue
Block a user