mirror of
https://github.com/AppleWin/AppleWin.git
synced 2026-04-20 00:17:16 +00:00
NTSC TV video modes: adjust y-position by 1 pixel (#650)
This commit is contained in:
@@ -556,25 +556,6 @@ void VideoRedrawScreen (void)
|
||||
|
||||
//===========================================================================
|
||||
|
||||
// TC: Hacky-fix for GH#341 - better to draw to the correct position in the framebuffer to start with! (in NTSC.cpp)
|
||||
// . NB. Now the dx is corrected in NTSC.cpp, updateVideoScannerAddress()
|
||||
static void VideoFrameBufferAdjust(int& xSrc, int& ySrc, bool bInvertY=false)
|
||||
{
|
||||
int dx=0, dy=0;
|
||||
|
||||
if (g_eVideoType == VT_MONO_TV || g_eVideoType == VT_COLOR_TV)
|
||||
{
|
||||
// Adjust the src locations for the NTSC video modes
|
||||
dy = -1;
|
||||
}
|
||||
|
||||
if (bInvertY)
|
||||
dy =- dy;
|
||||
|
||||
xSrc += dx;
|
||||
ySrc += dy;
|
||||
}
|
||||
|
||||
void VideoRefreshScreen ( uint32_t uRedrawWholeScreenVideoMode /* =0*/, bool bRedrawWholeScreen /* =false*/ )
|
||||
{
|
||||
if (bRedrawWholeScreen || g_nAppMode == MODE_PAUSED)
|
||||
@@ -593,7 +574,6 @@ void VideoRefreshScreen ( uint32_t uRedrawWholeScreenVideoMode /* =0*/, bool bRe
|
||||
{
|
||||
int xSrc = GetFrameBufferBorderWidth();
|
||||
int ySrc = GetFrameBufferBorderHeight();
|
||||
VideoFrameBufferAdjust(xSrc, ySrc); // TC: Hacky-fix for GH#341
|
||||
|
||||
int xdest = IsFullScreen() ? GetFullScreenOffsetX() : 0;
|
||||
int ydest = IsFullScreen() ? GetFullScreenOffsetY() : 0;
|
||||
@@ -1085,8 +1065,6 @@ static void Video_MakeScreenShot(FILE *pFile, const VideoScreenShot_e ScreenShot
|
||||
|
||||
int xSrc = GetFrameBufferBorderWidth();
|
||||
int ySrc = GetFrameBufferBorderHeight();
|
||||
VideoFrameBufferAdjust(xSrc, ySrc, true); // TC: Hacky-fix for GH#341 & GH#356
|
||||
// Lines stored in reverse, so invert the y-adjust value
|
||||
|
||||
pSrc += xSrc; // Skip left border
|
||||
pSrc += ySrc * GetFrameBufferWidth(); // Skip top border
|
||||
|
||||
Reference in New Issue
Block a user