mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-30 08:51:10 +02:00
gui/pipsetup.cpp: support different PIP setup for tv and radio modes
This commit is contained in:
@@ -25,10 +25,22 @@ extern cVideo *pipDecoder;
|
|||||||
CPipSetup::CPipSetup()
|
CPipSetup::CPipSetup()
|
||||||
{
|
{
|
||||||
frameBuffer = CFrameBuffer::getInstance();
|
frameBuffer = CFrameBuffer::getInstance();
|
||||||
x_coord = g_settings.pip_x;
|
|
||||||
y_coord = g_settings.pip_y;
|
if(CNeutrinoApp::getInstance()->getMode() == NeutrinoMessages::mode_radio) {
|
||||||
width = g_settings.pip_width;
|
gx = &g_settings.pip_radio_x;
|
||||||
height = g_settings.pip_height;
|
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);
|
maxw = frameBuffer->getScreenWidth(true);
|
||||||
maxh = frameBuffer->getScreenHeight(true);
|
maxh = frameBuffer->getScreenHeight(true);
|
||||||
@@ -53,8 +65,8 @@ void CPipSetup::move(int x, int y, bool abs)
|
|||||||
}
|
}
|
||||||
x_coord = newx;
|
x_coord = newx;
|
||||||
y_coord = newy;
|
y_coord = newy;
|
||||||
g_settings.pip_x = x_coord;
|
*gx = x_coord;
|
||||||
g_settings.pip_y = y_coord;
|
*gy = y_coord;
|
||||||
|
|
||||||
printf("CPipSetup::move: x %d y %d\n", x_coord, y_coord);
|
printf("CPipSetup::move: x %d y %d\n", x_coord, y_coord);
|
||||||
pipDecoder->Pig(x_coord, y_coord, width, height, maxw, maxh);
|
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;
|
width = neww;
|
||||||
height = newh;
|
height = newh;
|
||||||
}
|
}
|
||||||
g_settings.pip_width = width;
|
*gw = width;
|
||||||
g_settings.pip_height = height;
|
*gh = height;
|
||||||
|
|
||||||
printf("CPipSetup::resize: w %d h %d \n", width, height);
|
printf("CPipSetup::resize: w %d h %d \n", width, height);
|
||||||
pipDecoder->Pig(x_coord, y_coord, width, height, maxw, maxh);
|
pipDecoder->Pig(x_coord, y_coord, width, height, maxw, maxh);
|
||||||
|
@@ -17,6 +17,8 @@ class CPipSetup : public CMenuTarget
|
|||||||
int maxh;
|
int maxh;
|
||||||
int minw;
|
int minw;
|
||||||
int minh;
|
int minh;
|
||||||
|
|
||||||
|
int *gx, *gy, *gw, *gh;
|
||||||
void paint();
|
void paint();
|
||||||
void hide();
|
void hide();
|
||||||
void clear();
|
void clear();
|
||||||
|
Reference in New Issue
Block a user