From 6bb91bf2f0947dc8cd4433b01c053aa532c0272f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Thu, 3 Sep 2026 07:43:36 -0600 Subject: [PATCH] Remove the "Up to 2" buffered frames option Three frames in flight showed no performance benefit over two, so drop the option and clamp existing configs (and the default) down to 2. The now-unused "Up to 2" translation keys are left in place. Fixes #21419 Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01JvJR8oJNSCimCM9KXVLjfq --- Core/Config.cpp | 5 ++++- libretro/libretro.cpp | 2 -- libretro/libretro_core_options.h | 3 +-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Core/Config.cpp b/Core/Config.cpp index 48e3fb656f..5dca9c3f5d 100644 --- a/Core/Config.cpp +++ b/Core/Config.cpp @@ -755,7 +755,7 @@ static const ConfigSetting graphicsSettings[] = { ConfigSetting("GfxDebugOutput", SETTING(g_Config, bGfxDebugOutput), false, CfgFlag::DONT_SAVE), ConfigSetting("LogFrameDrops", SETTING(g_Config, bLogFrameDrops), false, CfgFlag::DEFAULT), - ConfigSetting("InflightFrames", SETTING(g_Config, iInflightFrames), 3, CfgFlag::DEFAULT), + ConfigSetting("InflightFrames", SETTING(g_Config, iInflightFrames), 2, CfgFlag::DEFAULT), ConfigSetting("RenderDuplicateFrames", SETTING(g_Config, bRenderDuplicateFrames), false, CfgFlag::PER_GAME), ConfigSetting("MultiThreading", SETTING(g_Config, bRenderMultiThreading), true, CfgFlag::DEFAULT), @@ -1611,6 +1611,9 @@ void Config::PostLoadCleanup() { // Clamp save state slot count to somewhat sane limits. iSaveStateSlotCount = std::clamp(iSaveStateSlotCount, 1, 100); + + // Three frames in flight showed no benefit over two, so the option is gone. Squash old values. + iInflightFrames = std::clamp(iInflightFrames, 1, 2); } void Config::PreSaveCleanup() { diff --git a/libretro/libretro.cpp b/libretro/libretro.cpp index 40ab3c5d9f..9af1ce8169 100644 --- a/libretro/libretro.cpp +++ b/libretro/libretro.cpp @@ -778,8 +778,6 @@ static void check_variables(CoreParameter &coreParam) g_Config.iInflightFrames = 1; else if (!strcmp(var.value, "Up to 1")) g_Config.iInflightFrames = 2; - else if (!strcmp(var.value, "Up to 2")) - g_Config.iInflightFrames = 3; } var.key = "ppsspp_skip_buffer_effects"; diff --git a/libretro/libretro_core_options.h b/libretro/libretro_core_options.h index 800860ddae..333ac3a5e1 100644 --- a/libretro/libretro_core_options.h +++ b/libretro/libretro_core_options.h @@ -436,10 +436,9 @@ struct retro_core_option_v2_definition option_defs_us[] = { { { "No buffer", NULL }, { "Up to 1", NULL }, - { "Up to 2", NULL }, { NULL, NULL }, }, - "Up to 2" + "Up to 1" }, { "ppsspp_button_preference",