From 425d4b093765873b7a5613ae5dc84202185e419a Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Sat, 29 May 2021 10:55:40 +0200 Subject: [PATCH] Added an option to upscale the video frame rate to 60 FPS. --- es-app/src/guis/GuiMenu.cpp | 13 +++++++++++++ es-core/src/Settings.cpp | 1 + 2 files changed, 14 insertions(+) diff --git a/es-app/src/guis/GuiMenu.cpp b/es-app/src/guis/GuiMenu.cpp index d82ebe67d..3340126ce 100644 --- a/es-app/src/guis/GuiMenu.cpp +++ b/es-app/src/guis/GuiMenu.cpp @@ -1034,6 +1034,19 @@ void GuiMenu::openOtherOptions() }); #endif + // Whether to upscale the video frame rate to 60 FPS. + auto video_upscale_frame_rate = std::make_shared(mWindow); + video_upscale_frame_rate->setState(Settings::getInstance()->getBool("VideoUpscaleFrameRate")); + s->addWithLabel("UPSCALE VIDEO FRAME RATE TO 60 FPS (FFMPEG)", video_upscale_frame_rate); + s->addSaveFunc([video_upscale_frame_rate, s] { + if (video_upscale_frame_rate->getState() != + Settings::getInstance()->getBool("VideoUpscaleFrameRate")) { + Settings::getInstance()-> + setBool("VideoUpscaleFrameRate", video_upscale_frame_rate->getState()); + s->setNeedsSaving(); + } + }); + // Allow overriding of the launch command per game (the option to disable this is // intended primarily for testing purposes). auto launchcommand_override = std::make_shared(mWindow); diff --git a/es-core/src/Settings.cpp b/es-core/src/Settings.cpp index e2e3317a9..b0fd64747 100644 --- a/es-core/src/Settings.cpp +++ b/es-core/src/Settings.cpp @@ -254,6 +254,7 @@ void Settings::setDefaults() "/usr/pkg/lib/libretro"; // NetBSD mStringMap["EmulatorCorePath"] = { emulatorCorePath, emulatorCorePath }; #endif + mBoolMap["VideoUpscaleFrameRate"] = { false, false }; mBoolMap["LaunchCommandOverride"] = { true, true }; mBoolMap["ShowHiddenFiles"] = { true, true }; mBoolMap["ShowHiddenGames"] = { true, true };