mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-05-11 09:44:52 +02:00
Resolve the reviewed comments of @ZappoMan
This commit is contained in:
parent
58142817a1
commit
c7c07b28e9
3 changed files with 3 additions and 7 deletions
|
@ -245,7 +245,6 @@ Setting::Handle<int> maxOctreePacketsPerSecond("maxOctreePPS", DEFAULT_MAX_OCTRE
|
||||||
|
|
||||||
static const QString MARKETPLACE_CDN_HOSTNAME = "mpassets.highfidelity.com";
|
static const QString MARKETPLACE_CDN_HOSTNAME = "mpassets.highfidelity.com";
|
||||||
static const int INTERVAL_TO_CHECK_HMD_WORN_STATUS = 500; // milliseconds
|
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";
|
static const QString DESKTOP_DISPLAY_PLUGIN_NAME = "Desktop";
|
||||||
|
|
||||||
const QHash<QString, Application::AcceptURLMethod> Application::_acceptedExtensions {
|
const QHash<QString, Application::AcceptURLMethod> Application::_acceptedExtensions {
|
||||||
|
@ -1344,12 +1343,7 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo
|
||||||
_autoSwitchDisplayModeSupportedHMDPlugin = nullptr;
|
_autoSwitchDisplayModeSupportedHMDPlugin = nullptr;
|
||||||
foreach(DisplayPluginPointer displayPlugin, PluginManager::getInstance()->getDisplayPlugins()) {
|
foreach(DisplayPluginPointer displayPlugin, PluginManager::getInstance()->getDisplayPlugins()) {
|
||||||
if (displayPlugin->isHmd() &&
|
if (displayPlugin->isHmd() &&
|
||||||
displayPlugin->getName() == DISPLAY_PLUGIN_NAME_OCULUS_RIFT) {
|
displayPlugin->getSupportsAutoSwitch()) {
|
||||||
|
|
||||||
// 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")
|
|
||||||
|
|
||||||
_autoSwitchDisplayModeSupportedHMDPlugin = displayPlugin;
|
_autoSwitchDisplayModeSupportedHMDPlugin = displayPlugin;
|
||||||
_autoSwitchDisplayModeSupportedHMDPluginName =
|
_autoSwitchDisplayModeSupportedHMDPluginName =
|
||||||
_autoSwitchDisplayModeSupportedHMDPlugin->getName();
|
_autoSwitchDisplayModeSupportedHMDPlugin->getName();
|
||||||
|
|
|
@ -200,6 +200,7 @@ public:
|
||||||
virtual float newFramePresentRate() const { return -1.0f; }
|
virtual float newFramePresentRate() const { return -1.0f; }
|
||||||
// Rate at which rendered frames are being skipped
|
// Rate at which rendered frames are being skipped
|
||||||
virtual float droppedFrameRate() const { return -1.0f; }
|
virtual float droppedFrameRate() const { return -1.0f; }
|
||||||
|
virtual bool getSupportsAutoSwitch() { return false; }
|
||||||
|
|
||||||
// Hardware specific stats
|
// Hardware specific stats
|
||||||
virtual QJsonObject getHardwareStats() const { return QJsonObject(); }
|
virtual QJsonObject getHardwareStats() const { return QJsonObject(); }
|
||||||
|
|
|
@ -26,6 +26,7 @@ public:
|
||||||
void resetSensors() override final;
|
void resetSensors() override final;
|
||||||
bool beginFrameRender(uint32_t frameIndex) override;
|
bool beginFrameRender(uint32_t frameIndex) override;
|
||||||
float getTargetFrameRate() const override { return _hmdDesc.DisplayRefreshRate; }
|
float getTargetFrameRate() const override { return _hmdDesc.DisplayRefreshRate; }
|
||||||
|
bool getSupportsAutoSwitch() override final { return true; }
|
||||||
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
Loading…
Reference in a new issue