gpgx now width-doubles to match height-doubled hi-res video
This commit is contained in:
parent
6c046a5df9
commit
4e2892d852
|
@ -42,34 +42,57 @@ namespace BizHawk.Emulation.Cores.Consoles.Sega.gpgx
|
||||||
|
|
||||||
LibGPGX.gpgx_get_video(out gpwidth, out gpheight, out gppitch, ref src);
|
LibGPGX.gpgx_get_video(out gpwidth, out gpheight, out gppitch, ref src);
|
||||||
|
|
||||||
|
//in case we're receiving high vertical resolution video, we shall double the horizontal resolution to keep the same proportions
|
||||||
|
//(concept pioneered for snes)
|
||||||
|
|
||||||
|
bool dotDouble = (gpheight == 448); //todo: pal?
|
||||||
|
|
||||||
vwidth = gpwidth;
|
vwidth = gpwidth;
|
||||||
vheight = gpheight;
|
vheight = gpheight;
|
||||||
|
|
||||||
if (_settings.PadScreen320 && vwidth == 256)
|
if (_settings.PadScreen320 && vwidth == 256)
|
||||||
vwidth = 320;
|
vwidth = 320;
|
||||||
|
|
||||||
int xpad = (vwidth - gpwidth) / 2;
|
int xpad = (vwidth - gpwidth) / 2;
|
||||||
int xpad2 = vwidth - gpwidth - xpad;
|
int xpad2 = vwidth - gpwidth - xpad;
|
||||||
|
|
||||||
|
if (dotDouble) vwidth *= 2;
|
||||||
|
|
||||||
if (vidbuff.Length < vwidth * vheight)
|
if (vidbuff.Length < vwidth * vheight)
|
||||||
vidbuff = new int[vwidth * vheight];
|
vidbuff = new int[vwidth * vheight];
|
||||||
|
|
||||||
int rinc = (gppitch / 4) - gpwidth;
|
int xskip = 1;
|
||||||
fixed (int* pdst_ = &vidbuff[0])
|
if (dotDouble)
|
||||||
{
|
xskip = 2;
|
||||||
int* pdst = pdst_;
|
|
||||||
int* psrc = (int*)src;
|
for (int D = 0; D < xskip; D++)
|
||||||
|
{
|
||||||
for (int j = 0; j < gpheight; j++)
|
int rinc = (gppitch / 4) - gpwidth;
|
||||||
{
|
fixed (int* pdst_ = &vidbuff[0])
|
||||||
for (int i = 0; i < xpad; i++)
|
{
|
||||||
*pdst++ = unchecked((int)0xff000000);
|
int* pdst = pdst_ + D;
|
||||||
for (int i = 0; i < gpwidth; i++)
|
int* psrc = (int*)src;
|
||||||
*pdst++ = *psrc++;// | unchecked((int)0xff000000);
|
|
||||||
for (int i = 0; i < xpad2; i++)
|
for (int j = 0; j < gpheight; j++)
|
||||||
*pdst++ = unchecked((int)0xff000000);
|
{
|
||||||
psrc += rinc;
|
for (int i = 0; i < xpad; i++)
|
||||||
}
|
{
|
||||||
|
*pdst = unchecked((int)0xff000000);
|
||||||
|
pdst += xskip;
|
||||||
|
}
|
||||||
|
for (int i = 0; i < gpwidth; i++)
|
||||||
|
{
|
||||||
|
*pdst = *psrc++;// | unchecked((int)0xff000000);
|
||||||
|
pdst += xskip;
|
||||||
|
}
|
||||||
|
for (int i = 0; i < xpad2; i++)
|
||||||
|
{
|
||||||
|
*pdst = unchecked((int)0xff000000);
|
||||||
|
pdst += xskip;
|
||||||
|
}
|
||||||
|
psrc += rinc;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue