Route VR mode through app preferences
This commit is contained in:
@@ -1159,18 +1159,13 @@ void App::init_menu_tools()
|
||||
|
||||
vr_btn->find<NodeCheckBox>("tools-vr-check")->on_value_changed = [this, main](Node* target, bool checked)
|
||||
{
|
||||
if (checked)
|
||||
{
|
||||
if (!vr_start())
|
||||
{
|
||||
auto cb = static_cast<NodeCheckBox*>(target);
|
||||
cb->set_value(false);
|
||||
message_box("VR Failed", "Couldn't start Virtual Reality mode");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
vr_stop();
|
||||
const auto status = pp::panopainter::execute_legacy_vr_mode_preference(
|
||||
*this,
|
||||
checked);
|
||||
if (!status.ok()) {
|
||||
auto cb = static_cast<NodeCheckBox*>(target);
|
||||
cb->set_value(false);
|
||||
message_box("VR Failed", "Couldn't start Virtual Reality mode");
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user