- moved UpdateVRModes, AppActive and gamestate into the backend.
This commit is contained in:
parent
65f6e788eb
commit
8e6bdd72fa
6 changed files with 34 additions and 32 deletions
|
|
@ -44,6 +44,7 @@
|
|||
#include "gl_framebuffer.h"
|
||||
#include "gl_shaderprogram.h"
|
||||
#include "gl_buffers.h"
|
||||
#include "menu.h"
|
||||
|
||||
|
||||
EXTERN_CVAR(Int, vr_mode)
|
||||
|
|
@ -53,7 +54,32 @@ EXTERN_CVAR(Float, vid_contrast)
|
|||
EXTERN_CVAR(Int, gl_satformula)
|
||||
EXTERN_CVAR(Int, gl_dither_bpc)
|
||||
|
||||
void UpdateVRModes(bool considerQuadBuffered = true);
|
||||
#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;
|
||||
}
|
||||
|
||||
namespace OpenGLRenderer
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue