mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2026-02-28 14:00:49 -05:00
VideoCommon: Make Presenter aware of the next swap time to eliminate unsafe usage of GetTicks() with ImmediateXFB + DualCore.
This commit is contained in:
@@ -65,6 +65,7 @@ namespace
|
||||
{
|
||||
AVRational GetTimeBaseForCurrentRefreshRate(s64 max_denominator)
|
||||
{
|
||||
// TODO: GetTargetRefreshRate* are not safe from GPU thread.
|
||||
auto& vi = Core::System::GetInstance().GetVideoInterface();
|
||||
int num;
|
||||
int den;
|
||||
@@ -368,6 +369,7 @@ void FFMpegFrameDump::AddFrame(const FrameData& frame)
|
||||
// Calculate presentation timestamp from ticks since start.
|
||||
const s64 pts = av_rescale_q(
|
||||
frame.state.ticks - m_context->start_ticks,
|
||||
// TODO: GetTicksPerSecond is not safe from GPU thread.
|
||||
AVRational{1, int(Core::System::GetInstance().GetSystemTimers().GetTicksPerSecond())},
|
||||
m_context->codec->time_base);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user