mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-04-14 15:51:29 +02:00
VideoInterface: Throttle for VBlank only when necessary.
This commit is contained in:
parent
c42dab6388
commit
af1f07207f
@ -853,10 +853,14 @@ void VideoInterfaceManager::EndField(FieldType field, u64 ticks)
|
||||
if (!Config::Get(Config::GFX_HACK_EARLY_XFB_OUTPUT))
|
||||
OutputField(field, ticks);
|
||||
|
||||
// Note: We really only need to Throttle prior to to presentation,
|
||||
// but it is needed here if we want accurate "VBlank" statistics,
|
||||
// when using GPU-on-Thread or Early/Immediate XFB.
|
||||
m_system.GetCoreTiming().Throttle(ticks);
|
||||
// Note: OutputField above doesn't present when using GPU-on-Thread or Early/Immediate XFB,
|
||||
// giving "VBlank" measurements here poor pacing without a Throttle call.
|
||||
// If the user actually wants the data, we'll Throttle to make the numbers nice.
|
||||
const bool is_vblank_data_wanted = g_ActiveConfig.bShowVPS || g_ActiveConfig.bShowVTimes ||
|
||||
g_ActiveConfig.bLogRenderTimeToFile ||
|
||||
g_ActiveConfig.bShowGraphs;
|
||||
if (is_vblank_data_wanted)
|
||||
m_system.GetCoreTiming().Throttle(ticks);
|
||||
|
||||
g_perf_metrics.CountVBlank();
|
||||
VIEndFieldEvent::Trigger();
|
||||
|
Loading…
x
Reference in New Issue
Block a user