mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-26 23:13:00 +02:00
dvbsubtitle.cpp: fix wconversion compiler warnings
Origin commit data
------------------
Branch: ni/coolstream
Commit: d9aab3ed81
Author: Thilo Graf <dbt@novatux.de>
Date: 2016-04-16 (Sat, 16 Apr 2016)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
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 yc = (double) CFrameBuffer::getInstance()->getScreenHeight(true)/(double) 576;
|
||||
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++) {
|
||||
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 xoff, yoff;
|
||||
|
||||
int nw = width == 1280 ? ((double) width / xc) : ((double) width * xc);
|
||||
int nh = (double) height * yc;
|
||||
int nw = int(width == 1280 ? ((double) width / xc) : ((double) width * xc));
|
||||
int nh = int((double) height * yc);
|
||||
|
||||
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) {
|
||||
yoff = ystart + sub.rects[i]->y*yc;
|
||||
yoff = int(ystart + sub.rects[i]->y*yc);
|
||||
} 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)
|
||||
yoff = ystart;
|
||||
}
|
||||
@@ -343,7 +343,7 @@ int cDvbSubtitleConverter::Action(void)
|
||||
bitmaps->Del(sb, true);
|
||||
}
|
||||
else if (Delta < WaitMs)
|
||||
WaitMs = (Delta > SHOW_DELTA) ? Delta - SHOW_DELTA : Delta;
|
||||
WaitMs = int((Delta > SHOW_DELTA) ? Delta - SHOW_DELTA : Delta);
|
||||
}
|
||||
else
|
||||
bitmaps->Del(sb, true);
|
||||
|
Reference in New Issue
Block a user