Skip to content

Commit

Permalink
Allow sync on field to work even if tiled rendering is off
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
SuperrSonic committed Mar 30, 2024
1 parent 35d246d commit 9e4237c
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions source/video.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 9e4237c

Please sign in to comment.