1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-15 19:19:55 +00:00

Global setting for vr mode

This commit is contained in:
Mads Buvik Sandvei 2020-11-01 15:50:59 +01:00
parent 4a42a299d8
commit 77ab249d06
2 changed files with 15 additions and 1 deletions

View file

@ -19,7 +19,7 @@ MWBase::Environment *MWBase::Environment::sThis = 0;
MWBase::Environment::Environment()
: mWorld (0), mSoundManager (0), mScriptManager (0), mWindowManager (0),
mMechanicsManager (0), mDialogueManager (0), mJournal (0), mInputManager (0), mStateManager (0),
mFrameDuration (0), mFrameRateLimit(0.f)
mFrameDuration (0), mFrameRateLimit(0.f), mVrMode(false)
{
assert (!sThis);
sThis = this;
@ -104,6 +104,16 @@ void MWBase::Environment::limitFrameRate(double dt) const
}
}
void MWBase::Environment::setVrMode(bool vrMode)
{
mVrMode = vrMode;
}
bool MWBase::Environment::getVrMode(void)
{
return mVrMode;
}
MWBase::World *MWBase::Environment::getWorld() const
{
assert (mWorld);

View file

@ -39,6 +39,7 @@ namespace MWBase
StateManager *mStateManager;
float mFrameDuration;
float mFrameRateLimit;
bool mVrMode;
Environment (const Environment&);
///< not implemented
@ -77,6 +78,9 @@ namespace MWBase
float getFrameRateLimit() const;
void limitFrameRate(double dt) const;
void setVrMode(bool vrMode);
bool getVrMode(void);
World *getWorld() const;
SoundManager *getSoundManager() const;