if (keying)
{
UINT newChannel = 0;
- for(int i = keying - 1; i >= 0; i--) newChannel += keyingInput[i] * (ULONG)pow(10., i);
+ for(int i = keying - 1; i >= 0; i--) newChannel += keyingInput[i] * static_cast<int>(pow(10.f, i));
channelChange(NUMBER, newChannel);
osdChannelIndex = currentChannelIndex;
for (i = 0; i < numberWidth; i++) keyingString[i] = '_';
keyingString[numberWidth] = '\0';
- for (i = 0; i < keying; i++) keyingString[i] = keyingInput[keying - 1 - i] + 48;
+ for (i = 0; i < keying; i++) keyingString[i] = static_cast<char>(keyingInput[keying - 1 - i] + 48);
if (keying == numberWidth)
{
UINT newChannel = 0;
- for(i = keying - 1; i >= 0; i--) newChannel += keyingInput[i] * (ULONG)pow(10., i);
+ for(i = keying - 1; i >= 0; i--) newChannel += keyingInput[i] * static_cast<int>(pow(10.f, i));
channelChange(NUMBER, newChannel);
osdChannelIndex = currentChannelIndex;
{
Log::getInstance()->log("VVideoLiveTV", Log::DEBUG, "Timer Call 1 key start.");
UINT newChannel = 0;
- for(int i = keying - 1; i >= 0; i--) newChannel += keyingInput[i] * (ULONG)pow(10., i);
+ for(int i = keying - 1; i >= 0; i--) newChannel += keyingInput[i] * static_cast<int>(pow(10.f, i));
Message* m = new Message();
m->message = Message::CHANNEL_CHANGE;
int y = m->tag - osd.getScreenY();
if (osd.getVisible())
{
- if ((boxRed.getX()<=x) && (boxRed.getX()+(int)boxRed.getWidth()>=x ) &&
- (boxRed.getY()<=y) && (boxRed.getY()+(int)boxRed.getHeight()>=y ))
- {
- BoxStack::getInstance()->handleCommand(Input::RED);
- }
- else if ((boxGreen.getX()<=x) && (boxGreen.getX()+(int)boxGreen.getWidth()>=x ) &&
- (boxGreen.getY()<=y) && (boxGreen.getY()+(int)boxGreen.getHeight()>=y))
- {
- BoxStack::getInstance()->handleCommand(Input::GREEN);
- }
- else if ((boxYellow.getX()<=x) && (boxYellow.getX()+(int)boxYellow.getWidth()>=x ) &&
- (boxYellow.getY()<=y) && (boxYellow.getY()+(int)boxYellow.getHeight()>=y )){
- BoxStack::getInstance()->handleCommand(Input::YELLOW);
- }
- else if ((boxBlue.getX()<=x) && (boxBlue.getX()+(int)boxBlue.getWidth()>=x ) &&
- (boxBlue.getY()<=y) && (boxBlue.getY()+(int)boxBlue.getHeight()>=y ))
- {
- BoxStack::getInstance()->handleCommand(Input::BLUE);
- }
- else
- {
- BoxStack::getInstance()->handleCommand(Input::OK); //simulate rok press
- }
+ if ((boxRed.getX() <= x) && (boxRed.getX() + static_cast<int>(boxRed.getWidth()) >= x) &&
+ (boxRed.getY() <= y) && (boxRed.getY() + static_cast<int>(boxRed.getHeight()) >= y))
+ {
+ BoxStack::getInstance()->handleCommand(Input::RED);
+ }
+ else if ((boxGreen.getX() <= x) && (boxGreen.getX() + static_cast<int>(boxGreen.getWidth()) >= x) &&
+ (boxGreen.getY() <= y) && (boxGreen.getY() + static_cast<int>(boxGreen.getHeight()) >= y))
+ {
+ BoxStack::getInstance()->handleCommand(Input::GREEN);
+ }
+ else if ((boxYellow.getX() <= x) && (boxYellow.getX() + static_cast<int>(boxYellow.getWidth()) >= x) &&
+ (boxYellow.getY() <= y) && (boxYellow.getY() + static_cast<int>(boxYellow.getHeight()) >= y))
+ {
+ BoxStack::getInstance()->handleCommand(Input::YELLOW);
+ }
+ else if ((boxBlue.getX() <= x) && (boxBlue.getX() + static_cast<int>(boxBlue.getWidth()) >= x) &&
+ (boxBlue.getY() <= y) && (boxBlue.getY() + static_cast<int>(boxBlue.getHeight()) >= y))
+ {
+ BoxStack::getInstance()->handleCommand(Input::BLUE);
+ }
+ else
+ {
+ BoxStack::getInstance()->handleCommand(Input::OK); //simulate rok press
+ }
}
else
{
Region r;
r.x = posX+region.windowx; r.y = posY+region.windowy; r.w = width; r.h = height;
//now convert to our display
- float scalex=720.f/((float) (region.framewidth+1));
- float scaley=576.f/((float) (region.frameheight+1));
- r.x = (UINT)floor(scalex*((float)r.x));
- r.y = (UINT)floor(scaley*((float)r.y));
- r.w = (UINT)(ceil(scalex*((float)r.w))+1.f);
- r.h = (UINT)(ceil(scaley*((float)r.h))+1.f);
+ float scalex = 720.f / static_cast<float>(region.framewidth + 1);
+ float scaley = 576.f / static_cast<float>(region.frameheight + 1);
+ r.x = static_cast<UINT>(floor(scalex * static_cast<float>(r.x)));
+ r.y = static_cast<UINT>(floor(scaley * static_cast<float>(r.y)));
+ r.w = static_cast<UINT>(ceil(scalex * static_cast<float>(r.w)) + 1.f);
+ r.h = static_cast<UINT>(ceil(scaley * static_cast<float>(r.h)) + 1.f);
rectangle(r, DrawStyle(0,0,0,0));
boxstack->update(this, &r);
}