Default stream resolution based on eye tracking

This commit is contained in:
Patrick Nicolas
2025-12-10 14:32:44 +01:00
parent db345c832d
commit 9b4a26b5a8
4 changed files with 28 additions and 7 deletions
+2 -2
View File
@@ -673,7 +673,7 @@ void scenes::lobby::gui_settings()
// Stream resolution
{
const int step = 10;
const auto current = config.stream_scale;
const auto current = config.get_stream_scale();
auto intval = int(current * 100 / step);
const auto slider = ImGui::SliderInt(
_("Stream resolution").append("##stream_scale").c_str(),
@@ -685,7 +685,7 @@ void scenes::lobby::gui_settings()
{
// clamp out of the slider to have the 50% value centered
intval = std::clamp(intval, 20 / step, 100 / step);
config.stream_scale = intval * step * 0.01;
config.set_stream_scale(intval * step * 0.01);
config.save();
}
imgui_ctx->vibrate_on_hover();
+5 -2
View File
@@ -222,8 +222,11 @@ std::shared_ptr<scenes::stream> scenes::stream::create(std::unique_ptr<wivrn_ses
info.render_eye_height = view.recommendedImageRectHeight * config.resolution_scale;
}
info.stream_eye_width = info.render_eye_width * config.stream_scale;
info.stream_eye_height = info.render_eye_height * config.stream_scale;
{
auto scale = config.get_stream_scale();
info.stream_eye_width = info.render_eye_width * scale;
info.stream_eye_height = info.render_eye_height * scale;
}
if (self->instance.has_extension(XR_FB_DISPLAY_REFRESH_RATE_EXTENSION_NAME))
{