Merge pull request #10708 from zfox23/spectatorCamera_fixMonitorDisplay

Ensure monitor never shows frozen SpectatorCamera preview
This commit is contained in:
Zach Fox 2017-06-15 15:35:31 -07:00 committed by GitHub
commit 130d98fcfc
3 changed files with 4 additions and 0 deletions

View file

@ -706,6 +706,7 @@ bool OpenGLDisplayPlugin::setDisplayTexture(const QString& name) {
// Note: it is the caller's responsibility to keep the network texture in cache.
if (name.isEmpty()) {
_displayTexture.reset();
onDisplayTextureReset();
return true;
}
auto textureCache = DependencyManager::get<TextureCache>();

View file

@ -58,6 +58,7 @@ public:
}
virtual bool setDisplayTexture(const QString& name) override;
virtual bool onDisplayTextureReset() { return false; };
QImage getScreenshot(float aspectRatio = 0.0f) const override;
float presentRate() const override;

View file

@ -46,6 +46,8 @@ public:
float stutterRate() const override;
virtual bool onDisplayTextureReset() override { _clearPreviewFlag = true; return true; };
protected:
virtual void hmdPresent() = 0;
virtual bool isHmdMounted() const = 0;