diff --git a/src/drivers/Qt/sdl-video.cpp b/src/drivers/Qt/sdl-video.cpp index d8b72a0d..2989c3d3 100644 --- a/src/drivers/Qt/sdl-video.cpp +++ b/src/drivers/Qt/sdl-video.cpp @@ -168,7 +168,7 @@ void CalcVideoDimensions(void) int iScale = nes_shm->video.xscale; if ( s_sponge == 3 ) { - nes_shm->video.ncol = iScale*301; + nes_shm->video.ncol = iScale*(301-(ClipSidesOffset ? 21 : 0)); } else { @@ -264,7 +264,7 @@ int InitVideo(FCEUGI *gi) int iScale = nes_shm->video.xscale; if ( s_sponge == 3 ) { - nes_shm->video.ncol = iScale*301; + nes_shm->video.ncol = iScale*(301-(ClipSidesOffset ? 21 : 0)); } else { @@ -446,7 +446,7 @@ doBlitScreen(uint8_t *XBuf, uint8_t *dest) if ( s_sponge == 3 ) { - w = ixScale*301; + w = ixScale*(301-(ClipSidesOffset ? 21 : 0)); bw = 256; } else @@ -539,7 +539,7 @@ uint32 PtoV(double nx, double ny) 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 { diff --git a/src/drivers/common/vidblit.cpp b/src/drivers/common/vidblit.cpp index 6fcdac4e..eca0f782 100644 --- a/src/drivers/common/vidblit.cpp +++ b/src/drivers/common/vidblit.cpp @@ -29,6 +29,7 @@ #include "../../palette.h" #include "../../utils/memory.h" #include "nes_ntsc.h" +#include "video.h" extern u8 *XBuf; extern u8 *XBackBuf; @@ -858,10 +859,9 @@ void Blit8ToHigh(uint8 *src, uint8 *dest, int xr, int yr, int pitch, int xscale, { case 4: 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 burst_phase ^= 1; - 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 );