Skip to content

Commit

Permalink
Counters: Don't skip vblanks on video mode change
Browse files Browse the repository at this point in the history
  • Loading branch information
stenzek committed Sep 9, 2023
1 parent ec1b782 commit cc221f5
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions pcsx2/Counters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -465,11 +465,10 @@ void UpdateVSyncRate(bool force)
if (custom && video_mode_initialized)
Console.Indent().WriteLn(Color_StrongGreen, "... with user configured refresh rate: %.02f Hz", vertical_frequency);

hsyncCounter.CycleT = vSyncInfo.hRender; // Amount of cycles before the counter will be updated
vsyncCounter.CycleT = vSyncInfo.Render; // Amount of cycles before the counter will be updated
hsyncCounter.sCycle = cpuRegs.cycle;
vsyncCounter.sCycle = cpuRegs.cycle;
vsyncCounter.Mode = MODE_VRENDER;
hsyncCounter.CycleT = (hsyncCounter.Mode == MODE_HBLANK) ? vSyncInfo.hBlank : vSyncInfo.hRender;
vsyncCounter.CycleT = (vsyncCounter.Mode == MODE_GSBLANK) ?
vSyncInfo.GSBlank :
((vsyncCounter.Mode == MODE_VSYNC) ? vSyncInfo.Blank : vSyncInfo.Render);
cpuRcntSet();

PerformanceMetrics::SetVerticalFrequency(vertical_frequency);
Expand Down Expand Up @@ -683,7 +682,7 @@ __fi void rcntUpdate_hScanline()
if( !cpuTestCycle( hsyncCounter.sCycle, hsyncCounter.CycleT ) ) return;

//iopEventAction = 1;
if (hsyncCounter.Mode & MODE_HBLANK) { //HBLANK Start
if (hsyncCounter.Mode == MODE_HBLANK) { //HBLANK Start
rcntStartGate(false, hsyncCounter.sCycle);
psxCheckStartGate16(0);

Expand Down

0 comments on commit cc221f5

Please sign in to comment.