Use EGL_VENDOR instead of NV-CONTROL for Nvidia detection

The latter will still match on a hybrid system when the iGPU's EGL
implementation is in use. This scenario works properly with EGL
rendering in Qt and SDL, so we want to allow that.
This commit is contained in:
Cameron Gutman
2025-12-06 11:07:52 -06:00
parent c92dc2495e
commit 9c6d2bab19
4 changed files with 36 additions and 28 deletions
@@ -2,6 +2,7 @@
#include "eglvid.h"
#include "path.h"
#include "utils.h"
#include "streaming/session.h"
#include "streaming/streamutils.h"
@@ -436,8 +437,7 @@ bool EGLRenderer::initialize(PDECODER_PARAMETERS params)
// If we're using X11 GLX (both in SDL and Qt), don't use this renderer.
// Switching between EGL and GLX can cause interoperability issues.
if (strcmp(SDL_GetCurrentVideoDriver(), "x11") == 0 &&
!SDL_GetHintBoolean(SDL_HINT_VIDEO_X11_FORCE_EGL, SDL_FALSE)) {
if (!WMUtils::isEGLSafe()) {
EGL_LOG(Warn, "Disabled due to use of GLX");
return false;
}