configure bitrate on client only
This commit is contained in:
@@ -32,12 +32,14 @@
|
||||
#include "utils/i18n.h"
|
||||
#include "utils/mapped_file.h"
|
||||
#include "utils/overloaded.h"
|
||||
#if WIVRN_CLIENT_DEBUG_MENU
|
||||
#include "utils/ranges.h"
|
||||
#endif
|
||||
#include "version.h"
|
||||
#include "xr/body_tracker.h"
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#include <chrono>
|
||||
#include <chrono> // IWYU pragma: keep
|
||||
#include <entt/entity/fwd.hpp>
|
||||
#include <fastgltf/math.hpp>
|
||||
#include <fastgltf/types.hpp>
|
||||
@@ -689,6 +691,25 @@ void scenes::lobby::gui_settings()
|
||||
imgui_ctx->vibrate_on_hover();
|
||||
}
|
||||
|
||||
// Bitrate
|
||||
{
|
||||
const int mb = 1'000'000;
|
||||
const auto current = config.bitrate_bps;
|
||||
auto val = int(current / mb);
|
||||
const auto slider = ImGui::SliderInt(
|
||||
_("Bitrate").append("##bitrate").c_str(),
|
||||
&val,
|
||||
1,
|
||||
200,
|
||||
fmt::format(_F("{}Mbit/s"), val).c_str());
|
||||
if (slider)
|
||||
{
|
||||
config.bitrate_bps = val * mb;
|
||||
config.save();
|
||||
}
|
||||
imgui_ctx->vibrate_on_hover();
|
||||
}
|
||||
|
||||
if (instance.has_extension(XR_EXT_PERFORMANCE_SETTINGS_EXTENSION_NAME))
|
||||
{
|
||||
if (ImGui::Checkbox(_S("High power mode"), &config.high_power_mode))
|
||||
|
||||
Reference in New Issue
Block a user