From 9e4237c3e9f61c919ecbda88a77c33dcc43b5112 Mon Sep 17 00:00:00 2001 From: Diego A Date: Sat, 30 Mar 2024 15:27:18 -0400 Subject: [PATCH] Allow sync on field to work even if tiled rendering is off This creates a small issue if 480p is mixed with 4:3 mode, and TV is chosen as deinterlacer, it will not switch to 480i. --- source/video.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/source/video.cpp b/source/video.cpp index 3c4d31e..5408ae0 100644 --- a/source/video.cpp +++ b/source/video.cpp @@ -358,17 +358,14 @@ void Draw_VIDEO() static void vblank_cb(u32 retraceCnt) { if (flip_pending) { - if(sync_interlace == 1 && vmode->fbWidth > 640) { + if(sync_interlace == 1) { if(!VIDEO_GetNextField()) { VIDEO_SetNextFramebuffer(xfb[whichfb]); VIDEO_Flush(); whichfb ^= 1; - /*++whichfb; - if(whichfb > 2) - whichfb = 0;*/ flip_pending = false; } - } else if(sync_interlace == 2 && vmode->fbWidth > 640) { + } else if(sync_interlace == 2) { if(VIDEO_GetNextField()) { VIDEO_SetNextFramebuffer(xfb[whichfb]); VIDEO_Flush(); @@ -638,9 +635,12 @@ void SetMplTiled() // Clear framebuffers VIDEO_SetNextFramebuffer (xfb[0]); + + // TEST: If 480i is set this line can make line 21 cc work + //vmode->viYOrigin = -2; - VIDEO_Configure(vmode); - VIDEO_Flush(); + VIDEO_Configure(vmode); + VIDEO_Flush(); } void SetMplTiledOff()