Add environment variable override helper function
This allows FORCE_QT_GLES and SEPARATE_TEST_DECODER to override both true and false.
This commit is contained in:
parent
21fb2832e1
commit
41ad3c0938
9 changed files with 68 additions and 60 deletions
|
|
@ -5,6 +5,7 @@
|
|||
#include <initguid.h>
|
||||
#include "dxva2.h"
|
||||
#include "dxutil.h"
|
||||
#include "utils.h"
|
||||
#include "../ffmpeg.h"
|
||||
#include <streaming/streamutils.h>
|
||||
#include <streaming/session.h>
|
||||
|
|
@ -390,16 +391,11 @@ bool DXVA2Renderer::initializeQuirksForAdapter(IDirect3D9Ex* d3d9ex, int adapter
|
|||
SDL_assert(m_DeviceQuirks == 0);
|
||||
SDL_assert(!m_Device);
|
||||
|
||||
{
|
||||
bool ok;
|
||||
|
||||
m_DeviceQuirks = qEnvironmentVariableIntValue("DXVA2_QUIRK_FLAGS", &ok);
|
||||
if (ok) {
|
||||
SDL_LogWarn(SDL_LOG_CATEGORY_APPLICATION,
|
||||
"Using DXVA2 quirk override: 0x%x",
|
||||
m_DeviceQuirks);
|
||||
return true;
|
||||
}
|
||||
if (Utils::getEnvironmentVariableOverride("DXVA2_QUIRK_FLAGS", &m_DeviceQuirks)) {
|
||||
SDL_LogWarn(SDL_LOG_CATEGORY_APPLICATION,
|
||||
"Using DXVA2 quirk override: 0x%x",
|
||||
m_DeviceQuirks);
|
||||
return true;
|
||||
}
|
||||
|
||||
UINT adapterCount = d3d9ex->GetAdapterCount();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue