Route VR mode through app preferences
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user