adapt Pig() to blitter-based OSD border

Origin commit data
------------------
Branch: master
Commit: 46754e01b1
Author: martii <m4rtii@gmx.de>
Date: 2013-03-22 (Fri, 22 Mar 2013)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
martii
2013-03-22 21:54:55 +01:00
parent 1406a0dbc6
commit 2376741e0d
2 changed files with 21 additions and 1 deletions

View File

@@ -541,7 +541,11 @@ void cVideo::VideoParamWatchdog(void)
#endif
}
#ifdef MARTII
void cVideo::Pig(int x, int y, int w, int h, int osd_w, int osd_h, int startx, int starty, int endx, int endy)
#else
void cVideo::Pig(int x, int y, int w, int h, int osd_w, int osd_h)
#endif
{
char buffer[64];
int _x, _y, _w, _h;
@@ -559,10 +563,25 @@ void cVideo::Pig(int x, int y, int w, int h, int osd_w, int osd_h)
}
else
{
#ifdef MARTII
// need to do some additional adjustments because osd border is handled by blitter
x += startx;
x *= endx - startx + 1;
y += starty;
y *= endy - starty + 1;
w *= endx - startx + 1;
h *= endy - starty + 1;
#endif
_x = x * xres / osd_w;
_w = w * xres / osd_w;
_y = y * yres / osd_h;
_h = h * yres / osd_h;
#ifdef MARTII
_x /= 1280;
_y /= 720;
_w /= 1280;
_h /= 720;
#endif
}
lt_debug("%s: x:%d y:%d w:%d h:%d xr:%d yr:%d\n", __func__, _x, _y, _w, _h, xres, yres);
sprintf(buffer, "%x %x %x %x", _x, _y, _w, _h);

View File

@@ -177,10 +177,11 @@ class cVideo
void ShowPicture(const char * fname);
void StopPicture();
void Standby(unsigned int bOn);
void Pig(int x, int y, int w, int h, int osd_w = 1064, int osd_h = 600);
#ifdef MARTII
void Pig(int x, int y, int w, int h, int osd_w = 1064, int osd_h = 600, int startx = 0, int starty = 0, int endx = 1279, int endy = 719);
void SetControl(int, int);
#else
void Pig(int x, int y, int w, int h, int osd_w = 1064, int osd_h = 600);
void SetControl(int, int) { return; };
#endif
void VideoParamWatchdog(void);