rsx: Implement custom fractional frame limit

This commit is contained in:
Eladash 2022-10-23 06:43:01 +03:00 committed by Megamouse
parent 0113224cb6
commit 18e30c7e44
2 changed files with 7 additions and 0 deletions

View File

@ -3399,6 +3399,12 @@ namespace rsx
break;
}
if (double limit2 = g_cfg.video.second_frame_limit; limit2 >= 0.1 && (limit2 < limit || !limit))
{
// Apply a second limit
limit = limit2;
}
if (limit)
{
const u64 needed_us = static_cast<u64>(1000000 / limit);

View File

@ -130,6 +130,7 @@ struct cfg_root : cfg::node
cfg::_enum<video_resolution> resolution{ this, "Resolution", video_resolution::_720 };
cfg::_enum<video_aspect> aspect_ratio{ this, "Aspect ratio", video_aspect::_16_9 };
cfg::_enum<frame_limit_type> frame_limit{ this, "Frame limit", frame_limit_type::_auto, true };
cfg::_float<0, 1000> second_frame_limit{ this, "Second Frame Limit", 0, true }; // 0 disables its effect
cfg::_enum<msaa_level> antialiasing_level{ this, "MSAA", msaa_level::_auto };
cfg::_enum<shader_mode> shadermode{ this, "Shader Mode", shader_mode::async_recompiler };
cfg::_enum<gpu_preset_level> shader_precision{ this, "Shader Precision", gpu_preset_level::high };