fixes for new settings API

This commit is contained in:
Stephen Birarda 2015-02-04 10:53:05 -08:00
parent 11f3161029
commit 30afadc7b7
3 changed files with 7 additions and 2 deletions

View file

@ -21,6 +21,8 @@
#include <QScrollArea>
#include <QVBoxLayout>
#include "avatar/AvatarManager.h"
#include "AnimationsDialog.h"
AnimationsDialog::AnimationsDialog(QWidget* parent) :

View file

@ -154,7 +154,7 @@ void PreferencesDialog::loadPreferences() {
ui.outputStarveDetectionThresholdSpinner->setValue(audio->getOutputStarveDetectionThreshold());
ui.outputStarveDetectionPeriodSpinner->setValue(audio->getOutputStarveDetectionPeriod());
ui.realWorldFieldOfViewSpin->setValue(qApp->getAvatar()->getRealWorldFieldOfView());
ui.realWorldFieldOfViewSpin->setValue(DependencyManager::get<AvatarManager>()->getMyAvatar()->getRealWorldFieldOfView());
ui.fieldOfViewSpin->setValue(qApp->getFieldOfView());
@ -234,7 +234,7 @@ void PreferencesDialog::savePreferences() {
auto glCanvas = DependencyManager::get<GLCanvas>();
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());

View file

@ -114,6 +114,9 @@ public:
float getAudioOutputMsecsUnplayed() const;
int getOutputBufferSize() { return _outputBufferSizeFrames.get(); }
bool getOutputStarveDetectionEnabled() { return _outputStarveDetectionEnabled.get(); }
void setOutputStarveDetectionEnabled(bool enabled) { _outputStarveDetectionEnabled.set(enabled); }
int getOutputStarveDetectionPeriod() { return _outputStarveDetectionPeriodMsec.get(); }
void setOutputStarveDetectionPeriod(int msecs) { _outputStarveDetectionPeriodMsec.set(msecs); }