mirror of
https://github.com/ZDoom/Raze.git
synced 2025-05-30 08:51:08 +00:00
- added VR mode init code as this is actually functional with the new renderer.
Also moved a few things out of gl_texture.cpp as this file is scheduled to go away with Polymost.
This commit is contained in:
parent
7c4e9ea87e
commit
e098e0ca2e
4 changed files with 34 additions and 17 deletions
|
@ -731,3 +731,29 @@ DEFINE_ACTION_FUNCTION(_PlayerMenu, DrawPlayerSprite)
|
|||
return 0;
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
EXTERN_CVAR(Bool, vr_enable_quadbuffered)
|
||||
#endif
|
||||
|
||||
void UpdateVRModes(bool considerQuadBuffered)
|
||||
{
|
||||
FOptionValues** pVRModes = OptionValues.CheckKey("VRMode");
|
||||
if (pVRModes == nullptr) return;
|
||||
|
||||
TArray<FOptionValues::Pair>& vals = (*pVRModes)->mValues;
|
||||
TArray<FOptionValues::Pair> filteredValues;
|
||||
int cnt = vals.Size();
|
||||
for (int i = 0; i < cnt; ++i) {
|
||||
auto const& mode = vals[i];
|
||||
if (mode.Value == 7) { // Quad-buffered stereo
|
||||
#ifdef _WIN32
|
||||
if (!vr_enable_quadbuffered) continue;
|
||||
#else
|
||||
continue; // Remove quad-buffered option on Mac and Linux
|
||||
#endif
|
||||
if (!considerQuadBuffered) continue; // Probably no compatible screen mode was found
|
||||
}
|
||||
filteredValues.Push(mode);
|
||||
}
|
||||
vals = filteredValues;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue