mirror of
https://github.com/AppleWin/AppleWin.git
synced 2025-08-10 00:25:09 +00:00
@@ -1979,14 +1979,6 @@ void NTSC_SetVideoMode( uint32_t uVideoModeFlags, bool bDelay/*=false*/ )
|
|||||||
|
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
|
|
||||||
// TV modes don't write to the last line, so when switching from another (Monitor) mode there may be stale data left behind
|
|
||||||
void ClearLastLine(void)
|
|
||||||
{
|
|
||||||
uint32_t* p = (uint32_t*)g_pScanLines[VIDEO_SCANNER_Y_DISPLAY * 2 - 1];
|
|
||||||
for (UINT x = 0; x < NTSC_GetFrameBufferBorderlessWidth(); x++)
|
|
||||||
p[x] = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
void NTSC_SetVideoStyle() // (int v, int s)
|
void NTSC_SetVideoStyle() // (int v, int s)
|
||||||
{
|
{
|
||||||
int half = IsVideoStyle(VS_HALF_SCANLINES);
|
int half = IsVideoStyle(VS_HALF_SCANLINES);
|
||||||
@@ -2008,7 +2000,6 @@ void NTSC_SetVideoStyle() // (int v, int s)
|
|||||||
g_pFuncUpdateBnWPixel = updatePixelBnWColorTVDoubleScanline;
|
g_pFuncUpdateBnWPixel = updatePixelBnWColorTVDoubleScanline;
|
||||||
g_pFuncUpdateHuePixel = updatePixelHueColorTVDoubleScanline;
|
g_pFuncUpdateHuePixel = updatePixelHueColorTVDoubleScanline;
|
||||||
}
|
}
|
||||||
ClearLastLine();
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case VT_COLOR_MONITOR_NTSC:
|
case VT_COLOR_MONITOR_NTSC:
|
||||||
@@ -2040,7 +2031,6 @@ void NTSC_SetVideoStyle() // (int v, int s)
|
|||||||
else {
|
else {
|
||||||
g_pFuncUpdateBnWPixel = g_pFuncUpdateHuePixel = updatePixelBnWColorTVDoubleScanline;
|
g_pFuncUpdateBnWPixel = g_pFuncUpdateHuePixel = updatePixelBnWColorTVDoubleScanline;
|
||||||
}
|
}
|
||||||
ClearLastLine();
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case VT_MONO_AMBER:
|
case VT_MONO_AMBER:
|
||||||
|
@@ -559,6 +559,25 @@ 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*/ )
|
void VideoRefreshScreen ( uint32_t uRedrawWholeScreenVideoMode /* =0*/, bool bRedrawWholeScreen /* =false*/ )
|
||||||
{
|
{
|
||||||
if (bRedrawWholeScreen || g_nAppMode == MODE_PAUSED)
|
if (bRedrawWholeScreen || g_nAppMode == MODE_PAUSED)
|
||||||
@@ -577,6 +596,7 @@ void VideoRefreshScreen ( uint32_t uRedrawWholeScreenVideoMode /* =0*/, bool bRe
|
|||||||
{
|
{
|
||||||
int xSrc = GetFrameBufferBorderWidth();
|
int xSrc = GetFrameBufferBorderWidth();
|
||||||
int ySrc = GetFrameBufferBorderHeight();
|
int ySrc = GetFrameBufferBorderHeight();
|
||||||
|
VideoFrameBufferAdjust(xSrc, ySrc); // TC: Hacky-fix for GH#341
|
||||||
|
|
||||||
int xdest = IsFullScreen() ? GetFullScreenOffsetX() : 0;
|
int xdest = IsFullScreen() ? GetFullScreenOffsetX() : 0;
|
||||||
int ydest = IsFullScreen() ? GetFullScreenOffsetY() : 0;
|
int ydest = IsFullScreen() ? GetFullScreenOffsetY() : 0;
|
||||||
@@ -1137,6 +1157,8 @@ static void Video_MakeScreenShot(FILE *pFile, const VideoScreenShot_e ScreenShot
|
|||||||
|
|
||||||
int xSrc = GetFrameBufferBorderWidth();
|
int xSrc = GetFrameBufferBorderWidth();
|
||||||
int ySrc = GetFrameBufferBorderHeight();
|
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 += xSrc; // Skip left border
|
||||||
pSrc += ySrc * GetFrameBufferWidth(); // Skip top border
|
pSrc += ySrc * GetFrameBufferWidth(); // Skip top border
|
||||||
|
Reference in New Issue
Block a user