mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-04-30 09:14:54 +00:00
VideoInterface: Throttle for VBlank only when necessary.
This commit is contained in:
parent
c42dab6388
commit
af1f07207f
1 changed files with 8 additions and 4 deletions
|
@ -853,9 +853,13 @@ void VideoInterfaceManager::EndField(FieldType field, u64 ticks)
|
||||||
if (!Config::Get(Config::GFX_HACK_EARLY_XFB_OUTPUT))
|
if (!Config::Get(Config::GFX_HACK_EARLY_XFB_OUTPUT))
|
||||||
OutputField(field, ticks);
|
OutputField(field, ticks);
|
||||||
|
|
||||||
// Note: We really only need to Throttle prior to to presentation,
|
// Note: OutputField above doesn't present when using GPU-on-Thread or Early/Immediate XFB,
|
||||||
// but it is needed here if we want accurate "VBlank" statistics,
|
// giving "VBlank" measurements here poor pacing without a Throttle call.
|
||||||
// when using GPU-on-Thread or Early/Immediate XFB.
|
// 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);
|
m_system.GetCoreTiming().Throttle(ticks);
|
||||||
|
|
||||||
g_perf_metrics.CountVBlank();
|
g_perf_metrics.CountVBlank();
|
||||||
|
|
Loading…
Add table
Reference in a new issue