Resolve the reviewed comments of @ZappoMan

This commit is contained in:
NeetBhagat 2017-06-01 12:14:54 +05:30
parent 58142817a1
commit c7c07b28e9
3 changed files with 3 additions and 7 deletions

View file

@ -245,7 +245,6 @@ Setting::Handle<int> maxOctreePacketsPerSecond("maxOctreePPS", DEFAULT_MAX_OCTRE
static const QString MARKETPLACE_CDN_HOSTNAME = "mpassets.highfidelity.com";
static const int INTERVAL_TO_CHECK_HMD_WORN_STATUS = 500; // milliseconds
static const QString DISPLAY_PLUGIN_NAME_OCULUS_RIFT = "Oculus Rift";
static const QString DESKTOP_DISPLAY_PLUGIN_NAME = "Desktop";
const QHash<QString, Application::AcceptURLMethod> Application::_acceptedExtensions {
@ -1344,12 +1343,7 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo
_autoSwitchDisplayModeSupportedHMDPlugin = nullptr;
foreach(DisplayPluginPointer displayPlugin, PluginManager::getInstance()->getDisplayPlugins()) {
if (displayPlugin->isHmd() &&
displayPlugin->getName() == DISPLAY_PLUGIN_NAME_OCULUS_RIFT) {
// Currently auto switch display mode support is only for Oculus Rift
// To support other plugins, add a condition
// (|| displayPlugin->getName() == "Other HMD Display Plugin Name")
displayPlugin->getSupportsAutoSwitch()) {
_autoSwitchDisplayModeSupportedHMDPlugin = displayPlugin;
_autoSwitchDisplayModeSupportedHMDPluginName =
_autoSwitchDisplayModeSupportedHMDPlugin->getName();

View file

@ -200,6 +200,7 @@ public:
virtual float newFramePresentRate() const { return -1.0f; }
// Rate at which rendered frames are being skipped
virtual float droppedFrameRate() const { return -1.0f; }
virtual bool getSupportsAutoSwitch() { return false; }
// Hardware specific stats
virtual QJsonObject getHardwareStats() const { return QJsonObject(); }

View file

@ -26,6 +26,7 @@ public:
void resetSensors() override final;
bool beginFrameRender(uint32_t frameIndex) override;
float getTargetFrameRate() const override { return _hmdDesc.DisplayRefreshRate; }
bool getSupportsAutoSwitch() override final { return true; }
protected: