From 6248093e4b4aa3a1dd3d69a42222c671c944e9b1 Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Sun, 26 May 2019 21:37:18 -0700 Subject: [PATCH] Qt: Fix FPS target maxing out at 59.727 (fixes #1421) --- CHANGES | 1 + src/platform/qt/SettingsView.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 71f2c8511..d0872667f 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,7 @@ 0.7.3: (Future) Other fixes: - Switch: Fix threading-related crash on second launch + - Qt: Fix FPS target maxing out at 59.727 (fixes mgba.io/i/1421) 0.7.2: (2019-05-25) Emulation fixes: diff --git a/src/platform/qt/SettingsView.cpp b/src/platform/qt/SettingsView.cpp index 0c54f70bf..bee136d9a 100644 --- a/src/platform/qt/SettingsView.cpp +++ b/src/platform/qt/SettingsView.cpp @@ -389,7 +389,7 @@ void SettingsView::updateConfig() { } double nativeFps = double(GBA_ARM7TDMI_FREQUENCY) / double(VIDEO_TOTAL_LENGTH); - if (nativeFps - m_ui.fpsTarget->value() < 0.0001) { + if (fabs(nativeFps - m_ui.fpsTarget->value()) < 0.0001) { m_controller->setOption("fpsTarget", QVariant(nativeFps)); } else { saveSetting("fpsTarget", m_ui.fpsTarget);