Route VR mode through app preferences

This commit is contained in:
2026-06-04 14:22:39 +02:00
parent f8243566c4
commit 884a6d4940
8 changed files with 79 additions and 23 deletions

View File

@@ -37,6 +37,16 @@ public:
app_.set_ui_rtl(plan.direction == pp::app::InterfaceDirection::right_to_left);
}
bool apply_vr_mode_preference(const pp::app::StoredBooleanPreferencePlan& plan) override
{
if (plan.value) {
return app_.vr_start();
}
app_.vr_stop();
return true;
}
void apply_vr_controllers_preference(const pp::app::StoredBooleanPreferencePlan& plan) override
{
app_.vr_controllers_enabled = plan.value;
@@ -90,6 +100,12 @@ pp::foundation::Status execute_legacy_interface_direction_preference(App& app, b
return pp::app::execute_interface_direction_preference(right_to_left, services);
}
pp::foundation::Status execute_legacy_vr_mode_preference(App& app, bool enabled)
{
LegacyAppPreferenceServices services(app);
return pp::app::execute_vr_mode_preference(enabled, services);
}
pp::foundation::Status execute_legacy_vr_controllers_preference(App& app, bool enabled)
{
LegacyAppPreferenceServices services(app);