mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 04:18:12 +02:00
fixes for new settings API
This commit is contained in:
parent
11f3161029
commit
30afadc7b7
3 changed files with 7 additions and 2 deletions
|
@ -21,6 +21,8 @@
|
||||||
#include <QScrollArea>
|
#include <QScrollArea>
|
||||||
#include <QVBoxLayout>
|
#include <QVBoxLayout>
|
||||||
|
|
||||||
|
#include "avatar/AvatarManager.h"
|
||||||
|
|
||||||
#include "AnimationsDialog.h"
|
#include "AnimationsDialog.h"
|
||||||
|
|
||||||
AnimationsDialog::AnimationsDialog(QWidget* parent) :
|
AnimationsDialog::AnimationsDialog(QWidget* parent) :
|
||||||
|
|
|
@ -154,7 +154,7 @@ void PreferencesDialog::loadPreferences() {
|
||||||
ui.outputStarveDetectionThresholdSpinner->setValue(audio->getOutputStarveDetectionThreshold());
|
ui.outputStarveDetectionThresholdSpinner->setValue(audio->getOutputStarveDetectionThreshold());
|
||||||
ui.outputStarveDetectionPeriodSpinner->setValue(audio->getOutputStarveDetectionPeriod());
|
ui.outputStarveDetectionPeriodSpinner->setValue(audio->getOutputStarveDetectionPeriod());
|
||||||
|
|
||||||
ui.realWorldFieldOfViewSpin->setValue(qApp->getAvatar()->getRealWorldFieldOfView());
|
ui.realWorldFieldOfViewSpin->setValue(DependencyManager::get<AvatarManager>()->getMyAvatar()->getRealWorldFieldOfView());
|
||||||
|
|
||||||
ui.fieldOfViewSpin->setValue(qApp->getFieldOfView());
|
ui.fieldOfViewSpin->setValue(qApp->getFieldOfView());
|
||||||
|
|
||||||
|
@ -234,7 +234,7 @@ void PreferencesDialog::savePreferences() {
|
||||||
auto glCanvas = DependencyManager::get<GLCanvas>();
|
auto glCanvas = DependencyManager::get<GLCanvas>();
|
||||||
Application::getInstance()->resizeGL(glCanvas->width(), glCanvas->height());
|
Application::getInstance()->resizeGL(glCanvas->width(), glCanvas->height());
|
||||||
|
|
||||||
qApp->getAvatar()->setRealWorldFieldOfView(ui.realWorldFieldOfViewSpin->value());
|
DependencyManager::get<AvatarManager>()->getMyAvatar()->setRealWorldFieldOfView(ui.realWorldFieldOfViewSpin->value());
|
||||||
|
|
||||||
qApp->setFieldOfView(ui.fieldOfViewSpin->value());
|
qApp->setFieldOfView(ui.fieldOfViewSpin->value());
|
||||||
|
|
||||||
|
|
|
@ -114,6 +114,9 @@ public:
|
||||||
float getAudioOutputMsecsUnplayed() const;
|
float getAudioOutputMsecsUnplayed() const;
|
||||||
|
|
||||||
int getOutputBufferSize() { return _outputBufferSizeFrames.get(); }
|
int getOutputBufferSize() { return _outputBufferSizeFrames.get(); }
|
||||||
|
|
||||||
|
bool getOutputStarveDetectionEnabled() { return _outputStarveDetectionEnabled.get(); }
|
||||||
|
void setOutputStarveDetectionEnabled(bool enabled) { _outputStarveDetectionEnabled.set(enabled); }
|
||||||
|
|
||||||
int getOutputStarveDetectionPeriod() { return _outputStarveDetectionPeriodMsec.get(); }
|
int getOutputStarveDetectionPeriod() { return _outputStarveDetectionPeriodMsec.get(); }
|
||||||
void setOutputStarveDetectionPeriod(int msecs) { _outputStarveDetectionPeriodMsec.set(msecs); }
|
void setOutputStarveDetectionPeriod(int msecs) { _outputStarveDetectionPeriodMsec.set(msecs); }
|
||||||
|
|
Loading…
Reference in a new issue