Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 120 fps frame limit, remove 14 from anisotropic filter in home menu #16154

Merged
merged 2 commits into from
Sep 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ namespace rsx
: home_menu_settings_page(x, y, width, height, use_separators, parent, get_localized_string(localized_string_id::HOME_MENU_SETTINGS_VIDEO))
{
add_dropdown(&g_cfg.video.frame_limit, "Frame Limit");
add_unsigned_slider(&g_cfg.video.anisotropic_level_override, "Anisotropic Filter Override", "x", 2, {{0, "Auto"}});
add_unsigned_slider(&g_cfg.video.anisotropic_level_override, "Anisotropic Filter Override", "x", 2, {{0, "Auto"}}, {14});

add_dropdown(&g_cfg.video.output_scaling, "Output Scaling");
if (g_cfg.video.renderer == video_renderer::vulkan && g_cfg.video.output_scaling == output_scaling_mode::fsr)
Expand All @@ -65,7 +65,7 @@ namespace rsx
add_dropdown(&g_cfg.core.sleep_timers_accuracy, "Sleep Timers Accuracy");
add_signed_slider(&g_cfg.core.max_spurs_threads, "Max SPURS Threads", "", 1);

add_unsigned_slider(&g_cfg.video.driver_wakeup_delay, "Driver Wake-Up Delay", " µs", 20, {}, g_cfg.video.driver_wakeup_delay.min, 800);
add_unsigned_slider(&g_cfg.video.driver_wakeup_delay, "Driver Wake-Up Delay", " µs", 20, {}, {}, g_cfg.video.driver_wakeup_delay.min, 800);
add_signed_slider(&g_cfg.video.vblank_rate, "VBlank Frequency", " Hz", 30);
add_checkbox(&g_cfg.video.vblank_ntsc, "VBlank NTSC Fixup");

Expand Down
17 changes: 13 additions & 4 deletions rpcs3/Emu/RSX/Overlays/HomeMenu/overlay_home_menu_settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,13 @@ namespace rsx
}

template <u64 Min, u64 Max>
void add_unsigned_slider(cfg::uint<Min, Max>* setting, const std::string& text, const std::string& suffix, u64 step_size, std::map<u64, std::string> special_labels = {}, u64 minimum = Min, u64 maximum = Max)
void add_unsigned_slider(cfg::uint<Min, Max>* setting, const std::string& text, const std::string& suffix, u64 step_size, std::map<u64, std::string> special_labels = {}, const std::set<u64>& exceptions = {}, u64 minimum = Min, u64 maximum = Max)
{
ensure(setting && setting->get_is_dynamic());
ensure(!exceptions.contains(minimum) && !exceptions.contains(maximum));
std::unique_ptr<overlay_element> elem = std::make_unique<home_menu_unsigned_slider<Min, Max>>(setting, text, suffix, special_labels, minimum, maximum);

add_item(elem, [this, setting, text, step_size, minimum, maximum](pad_button btn) -> page_navigation
add_item(elem, [this, setting, text, step_size, minimum, maximum, exceptions](pad_button btn) -> page_navigation
{
if (setting)
{
Expand All @@ -141,11 +142,19 @@ namespace rsx
{
case pad_button::dpad_left:
case pad_button::ls_left:
value = step_size > value ? minimum : std::max(value - step_size, minimum);
do
{
value = step_size > value ? minimum : std::max(value - step_size, minimum);
}
while (exceptions.contains(value));
break;
case pad_button::dpad_right:
case pad_button::ls_right:
value = std::min(value + step_size, maximum);
do
{
value = std::min(value + step_size, maximum);
}
while (exceptions.contains(value));
break;
default:
return page_navigation::stay;
Expand Down
2 changes: 1 addition & 1 deletion rpcs3/Emu/system_config_types.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ void fmt_class_string<frame_limit_type>::format(std::string& out, u64 arg)
case frame_limit_type::_30: return "30";
case frame_limit_type::_50: return "50";
case frame_limit_type::_60: return "60";
case frame_limit_type::_120: return "60";
case frame_limit_type::_120: return "120";
case frame_limit_type::display_rate: return "Display";
case frame_limit_type::_auto: return "Auto";
case frame_limit_type::_ps3: return "PS3 Native";
Expand Down