MCPcopy Create free account
hub / github.com/PCSX2/pcsx2 / updateOptimalFramePacing

Method updateOptimalFramePacing

pcsx2-qt/Settings/EmulationSettingsWidget.cpp:284–304  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

282}
283
284void EmulationSettingsWidget::updateOptimalFramePacing()
285{
286 const QSignalBlocker sb(m_ui.optimalFramePacing);
287 const QSignalBlocker sb2(m_ui.maxFrameLatency);
288
289 int value = dialog()->getEffectiveIntValue("EmuCore/GS", "VsyncQueueSize", DEFAULT_FRAME_LATENCY);
290 bool optimal = (value == 0);
291 if (dialog()->isPerGameSettings() && !dialog()->getSettingsInterface()->GetIntValue("EmuCore/GS", "VsyncQueueSize", &value))
292 {
293 m_ui.optimalFramePacing->setCheckState(Qt::PartiallyChecked);
294 m_ui.maxFrameLatency->setEnabled(false);
295 }
296 else
297 {
298 m_ui.optimalFramePacing->setChecked(optimal);
299 m_ui.maxFrameLatency->setEnabled(!optimal);
300 }
301
302 m_ui.maxFrameLatency->setMinimum(optimal ? 0 : 1);
303 m_ui.maxFrameLatency->setValue(optimal ? 0 : value);
304}
305
306void EmulationSettingsWidget::updateUseVSyncForTimingEnabled()
307{

Callers

nothing calls this directly

Calls 4

getEffectiveIntValueMethod · 0.80
isPerGameSettingsMethod · 0.80
getSettingsInterfaceMethod · 0.80
GetIntValueMethod · 0.45

Tested by

no test coverage detected