Clip Left/Right Sides option now taken into account when using NTSC scaler
This commit is contained in:
parent
2fce5ffe74
commit
8e935a05a6
|
@ -168,7 +168,7 @@ void CalcVideoDimensions(void)
|
||||||
int iScale = nes_shm->video.xscale;
|
int iScale = nes_shm->video.xscale;
|
||||||
if ( s_sponge == 3 )
|
if ( s_sponge == 3 )
|
||||||
{
|
{
|
||||||
nes_shm->video.ncol = iScale*301;
|
nes_shm->video.ncol = iScale*(301-(ClipSidesOffset ? 21 : 0));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -264,7 +264,7 @@ int InitVideo(FCEUGI *gi)
|
||||||
int iScale = nes_shm->video.xscale;
|
int iScale = nes_shm->video.xscale;
|
||||||
if ( s_sponge == 3 )
|
if ( s_sponge == 3 )
|
||||||
{
|
{
|
||||||
nes_shm->video.ncol = iScale*301;
|
nes_shm->video.ncol = iScale*(301-(ClipSidesOffset ? 21 : 0));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -446,7 +446,7 @@ doBlitScreen(uint8_t *XBuf, uint8_t *dest)
|
||||||
|
|
||||||
if ( s_sponge == 3 )
|
if ( s_sponge == 3 )
|
||||||
{
|
{
|
||||||
w = ixScale*301;
|
w = ixScale*(301-(ClipSidesOffset ? 21 : 0));
|
||||||
bw = 256;
|
bw = 256;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -539,7 +539,7 @@ uint32 PtoV(double nx, double ny)
|
||||||
|
|
||||||
if ( nes_shm->video.preScaler == 3 )
|
if ( nes_shm->video.preScaler == 3 )
|
||||||
{
|
{
|
||||||
x = (int)( nx * (double)nes_shm->video.ncol * (256.0/301.0) );
|
x = (int)( nx * (double)nes_shm->video.ncol * (256.0/(301.0-(ClipSidesOffset ? 21 : 0))) );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -29,6 +29,7 @@
|
||||||
#include "../../palette.h"
|
#include "../../palette.h"
|
||||||
#include "../../utils/memory.h"
|
#include "../../utils/memory.h"
|
||||||
#include "nes_ntsc.h"
|
#include "nes_ntsc.h"
|
||||||
|
#include "video.h"
|
||||||
|
|
||||||
extern u8 *XBuf;
|
extern u8 *XBuf;
|
||||||
extern u8 *XBackBuf;
|
extern u8 *XBackBuf;
|
||||||
|
@ -858,10 +859,9 @@ void Blit8ToHigh(uint8 *src, uint8 *dest, int xr, int yr, int pitch, int xscale,
|
||||||
{
|
{
|
||||||
case 4:
|
case 4:
|
||||||
if ( nes_ntsc && GameInfo && GameInfo->type!=GIT_NSF) {
|
if ( nes_ntsc && GameInfo && GameInfo->type!=GIT_NSF) {
|
||||||
int outxr = 301;
|
int outxr = 301 - (ClipSidesOffset ? 21 : 0);
|
||||||
//if(xr == 282) outxr = 282; //hack for windows
|
//if(xr == 282) outxr = 282; //hack for windows
|
||||||
burst_phase ^= 1;
|
burst_phase ^= 1;
|
||||||
|
|
||||||
u8* srcD = XDBuf + (src-XBuf); // get deemphasis buffer
|
u8* srcD = XDBuf + (src-XBuf); // get deemphasis buffer
|
||||||
nes_ntsc_blit( nes_ntsc, (unsigned char*)src, (unsigned char*)srcD, xr, burst_phase, xr, yr, ntscblit, (2*outxr) * Bpp );
|
nes_ntsc_blit( nes_ntsc, (unsigned char*)src, (unsigned char*)srcD, xr, burst_phase, xr, yr, ntscblit, (2*outxr) * Bpp );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue