Non-functional direct to rift
This commit is contained in:
parent
338b9b8a7f
commit
b31f939f9e
1 changed files with 24 additions and 8 deletions
|
@ -454,6 +454,20 @@ bool CStereoOVR::attachToDisplay()
|
||||||
m_Driver->getWindowPos(m_OriginalWinPosX, m_OriginalWinPosY);
|
m_Driver->getWindowPos(m_OriginalWinPosX, m_OriginalWinPosY);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(NL_OS_WINDOWS)
|
||||||
|
if ((m_DevicePtr->HmdCaps & ovrHmdCap_ExtendDesktop) != ovrHmdCap_ExtendDesktop)
|
||||||
|
{
|
||||||
|
nldebug("OVR: Direct Rift");
|
||||||
|
CDriverUser *dru = static_cast<CDriverUser *>(m_Driver);
|
||||||
|
IDriver *drv = dru->getDriver();
|
||||||
|
m_AttachedDisplay = ovrHmd_AttachToWindow(m_DevicePtr, (void *)drv->getDisplay(), NULL, NULL);
|
||||||
|
if (!m_AttachedDisplay)
|
||||||
|
nlwarning("OVR: Direct Rift failed!");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
#endif
|
||||||
|
{
|
||||||
|
nldebug("OVR: Extended Rift");
|
||||||
UDriver::CMode mode;
|
UDriver::CMode mode;
|
||||||
mode.DisplayDevice = m_DevicePtr->DisplayDeviceName;
|
mode.DisplayDevice = m_DevicePtr->DisplayDeviceName;
|
||||||
mode.Windowed = false;
|
mode.Windowed = false;
|
||||||
|
@ -461,7 +475,9 @@ bool CStereoOVR::attachToDisplay()
|
||||||
mode.Height = m_DevicePtr->Resolution.h;
|
mode.Height = m_DevicePtr->Resolution.h;
|
||||||
m_Driver->setMode(mode);
|
m_Driver->setMode(mode);
|
||||||
m_AttachedDisplay = true;
|
m_AttachedDisplay = true;
|
||||||
return true;
|
}
|
||||||
|
|
||||||
|
return m_AttachedDisplay;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CStereoOVR::detachFromDisplay()
|
void CStereoOVR::detachFromDisplay()
|
||||||
|
|
Loading…
Reference in a new issue