gui/pipsetup.cpp: support different PIP setup for tv and radio modes

Origin commit data
------------------
Commit: ea1e2706f8
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2014-03-05 (Wed, 05 Mar 2014)
This commit is contained in:
[CST] Focus
2014-03-05 10:31:05 +04:00
parent a8651f21b3
commit e47eb1a1f7
2 changed files with 22 additions and 8 deletions

View File

@@ -25,10 +25,22 @@ extern cVideo *pipDecoder;
CPipSetup::CPipSetup()
{
frameBuffer = CFrameBuffer::getInstance();
x_coord = g_settings.pip_x;
y_coord = g_settings.pip_y;
width = g_settings.pip_width;
height = g_settings.pip_height;
if(CNeutrinoApp::getInstance()->getMode() == NeutrinoMessages::mode_radio) {
gx = &g_settings.pip_radio_x;
gy = &g_settings.pip_radio_y;
gw = &g_settings.pip_radio_width;
gh = &g_settings.pip_radio_height;
} else {
gx = &g_settings.pip_x;
gy = &g_settings.pip_y;
gw = &g_settings.pip_width;
gh = &g_settings.pip_height;
}
x_coord = *gx;
y_coord = *gy;
width = *gw;
height = *gh;
maxw = frameBuffer->getScreenWidth(true);
maxh = frameBuffer->getScreenHeight(true);
@@ -53,8 +65,8 @@ void CPipSetup::move(int x, int y, bool abs)
}
x_coord = newx;
y_coord = newy;
g_settings.pip_x = x_coord;
g_settings.pip_y = y_coord;
*gx = x_coord;
*gy = y_coord;
printf("CPipSetup::move: x %d y %d\n", x_coord, y_coord);
pipDecoder->Pig(x_coord, y_coord, width, height, maxw, maxh);
@@ -85,8 +97,8 @@ void CPipSetup::resize(int w, int h, bool abs)
width = neww;
height = newh;
}
g_settings.pip_width = width;
g_settings.pip_height = height;
*gw = width;
*gh = height;
printf("CPipSetup::resize: w %d h %d \n", width, height);
pipDecoder->Pig(x_coord, y_coord, width, height, maxw, maxh);

View File

@@ -17,6 +17,8 @@ class CPipSetup : public CMenuTarget
int maxh;
int minw;
int minh;
int *gx, *gy, *gw, *gh;
void paint();
void hide();
void clear();