Added missing platform dlls.
Refractoring and bugfixes. Added SteamVR tab: Supersampling and reprojection settings and restart button. Added Statistics tab: rotation counter, performance statistics and others. Updated Move Playspace tab: Rotation and Seated mode support.
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
#include "SettingsTabController.h"
|
||||
#include "../overlaycontroller.h"
|
||||
#include "../overlaywidget.h"
|
||||
#include "ui_overlaywidget.h"
|
||||
|
||||
// application namespace
|
||||
namespace advsettings {
|
||||
|
||||
|
||||
void SettingsTabController::init(OverlayController * parent, OverlayWidget * widget) {
|
||||
this->parent = parent;
|
||||
this->widget = widget;
|
||||
connect(widget->ui->AutoStartToggle, SIGNAL(toggled(bool)), this, SLOT(AutoStartToggled(bool)));
|
||||
}
|
||||
|
||||
void SettingsTabController::UpdateTab() {
|
||||
if (widget) {
|
||||
widget->ui->AutoStartToggle->blockSignals(true);
|
||||
if (vr::VRApplications()->GetApplicationAutoLaunch(OverlayController::applicationKey)) {
|
||||
widget->ui->AutoStartToggle->setChecked(true);
|
||||
} else {
|
||||
widget->ui->AutoStartToggle->setChecked(false);
|
||||
}
|
||||
widget->ui->AutoStartToggle->blockSignals(false);
|
||||
}
|
||||
}
|
||||
|
||||
void SettingsTabController::AutoStartToggled(bool value) {
|
||||
LOG(INFO) << "Setting auto start: " << value;
|
||||
auto apperror = vr::VRApplications()->SetApplicationAutoLaunch(OverlayController::applicationKey, value);
|
||||
if (apperror != vr::VRApplicationError_None) {
|
||||
LOG(ERROR) << "Could not set auto start: " << vr::VRApplications()->GetApplicationsErrorNameFromEnum(apperror);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} // namespace advconfig
|
||||
Reference in New Issue
Block a user