diff --git a/pcsx2/CDVD/CDVD.cpp b/pcsx2/CDVD/CDVD.cpp index 73fbe508f8..b5a9975d3f 100644 --- a/pcsx2/CDVD/CDVD.cpp +++ b/pcsx2/CDVD/CDVD.cpp @@ -975,7 +975,7 @@ u8 monthmap[13] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; void cdvdVsync() { cdvd.RTCcount++; - if (cdvd.RTCcount < ((gsVideoMode == GS_VideoMode::NTSC) ? 60 : 50)) return; + if (cdvd.RTCcount < (GetVerticalFrequency().ToIntRounded())) return; cdvd.RTCcount = 0; if ( cdvd.Status == CDVD_STATUS_TRAY_OPEN ) diff --git a/pcsx2/CDVD/CDVD.h b/pcsx2/CDVD/CDVD.h index 24a2e12bbf..7714d6fb36 100644 --- a/pcsx2/CDVD/CDVD.h +++ b/pcsx2/CDVD/CDVD.h @@ -100,6 +100,8 @@ struct cdvdStruct { u8 CReadWrite; u8 CNumBlocks; + // Calculates the number of Vsyncs and once it reaches a total number of Vsyncs worth a second with respect to + // the videomode's vertical frequency, it updates the real time clock. int RTCcount; cdvdRTC RTC; diff --git a/pcsx2/Counters.h b/pcsx2/Counters.h index e1ff51af07..bc19e92d4d 100644 --- a/pcsx2/Counters.h +++ b/pcsx2/Counters.h @@ -123,7 +123,6 @@ struct SyncCounter #define MODE_HBLANK 0x1 //Set for the remaining ~1/6 of 1 Scanline -extern Fixed100 GetVerticalFrequency(); extern Counter counters[4]; extern SyncCounter hsyncCounter; extern SyncCounter vsyncCounter; diff --git a/pcsx2/GS.h b/pcsx2/GS.h index ad90b41c31..6ab029b92e 100644 --- a/pcsx2/GS.h +++ b/pcsx2/GS.h @@ -19,6 +19,7 @@ #include "System/SysThreads.h" #include "Gif.h" +extern Fixed100 GetVerticalFrequency(); extern __aligned16 u8 g_RealGSMem[Ps2MemSize::GSregs]; enum CSR_FifoState