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

Method onOptimalFramePacingChanged

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

Source from the content-addressed store, hash-verified

258}
259
260void EmulationSettingsWidget::onOptimalFramePacingChanged()
261{
262 const QSignalBlocker sb(m_ui.maxFrameLatency);
263
264 std::optional<int> value;
265 bool optimal = false;
266 if (m_ui.optimalFramePacing->checkState() != Qt::PartiallyChecked)
267 {
268 optimal = m_ui.optimalFramePacing->isChecked();
269 value = optimal ? 0 : DEFAULT_FRAME_LATENCY;
270 }
271 else
272 {
273 value = dialog()->getEffectiveIntValue("EmuCore/GS", "VsyncQueueSize", DEFAULT_FRAME_LATENCY);
274 optimal = (value == 0);
275 }
276
277 m_ui.maxFrameLatency->setMinimum(optimal ? 0 : 1);
278 m_ui.maxFrameLatency->setValue(optimal ? 0 : DEFAULT_FRAME_LATENCY);
279 m_ui.maxFrameLatency->setEnabled(!dialog()->isPerGameSettings() && !m_ui.optimalFramePacing->isChecked());
280
281 dialog()->setIntSettingValue("EmuCore/GS", "VsyncQueueSize", value);
282}
283
284void EmulationSettingsWidget::updateOptimalFramePacing()
285{

Callers

nothing calls this directly

Calls 3

getEffectiveIntValueMethod · 0.80
isPerGameSettingsMethod · 0.80
setIntSettingValueMethod · 0.80

Tested by

no test coverage detected