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:
Cameron Gutman committed 2025-12-27 15:33:39 -06:00
1 parent 21fb2832e1
commit 41ad3c0938
9 files changed
+68 -60

No files matched your search

@@ -1,4 +1,5 @@
#include "genhwaccel.h"
#include "utils.h"
GenericHwAccelRenderer::GenericHwAccelRenderer(AVHWDeviceType hwDeviceType)
: IFFmpegRenderer(RendererType::Unknown),
@@ -56,9 +57,9 @@ bool GenericHwAccelRenderer::isDirectRenderingSupported()
int GenericHwAccelRenderer::getDecoderCapabilities()
{
bool ok;
int caps = qEnvironmentVariableIntValue("GENHWACCEL_CAPS", &ok);
if (ok) {
int caps;
if (Utils::getEnvironmentVariableOverride("GENHWACCEL_CAPS", &caps)) {
SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION,
"Using GENHWACCEL_CAPS for decoder capabilities: %x",
caps);