Use 5mbps step size for bitrate slider

This commit is contained in:
Sapphire
2026-02-04 18:26:26 -06:00
parent bb92a5e388
commit 2ec78da729
+5 -4
View File
@@ -761,18 +761,19 @@ void scenes::lobby::gui_settings()
// Bitrate
{
const int step = 5;
const int mb = 1'000'000;
const auto current = config.bitrate_bps;
auto val = int(current / mb);
auto val = int(current / mb / step);
const auto slider = ImGui::SliderInt(
_("Bitrate").append("##bitrate").c_str(),
&val,
1,
config.max_bitrate() / mb,
fmt::format(_F("{}Mbit/s"), val).c_str());
config.max_bitrate() / mb / step,
fmt::format(_F("{}Mbit/s"), val * step).c_str());
if (slider)
{
config.bitrate_bps = val * mb;
config.bitrate_bps = val * mb * step;
config.save();
}
imgui_ctx->vibrate_on_hover();