mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-06-18 06:30:55 +00:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user