aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Rusak <lorusak@gmail.com>2023-10-10 19:49:25 -0700
committerLukas Rusak <lorusak@gmail.com>2023-10-15 19:26:31 -0700
commite85777502d12180a4f45cc137f7991b1157b178d (patch)
treeaa00cab78ee9ab56fb3722150b89dd272870feed
parenta503b32dd6e7bdc4712b011f2ac212b45f1bf9d3 (diff)
downloadxbmc-e85777502d12180a4f45cc137f7991b1157b178d.tar.xz
CWinSystemX11GLContext: select gl interface from command line switch
Signed-off-by: Lukas Rusak <lorusak@gmail.com>
-rw-r--r--xbmc/windowing/X11/WinSystemX11GLContext.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/xbmc/windowing/X11/WinSystemX11GLContext.cpp b/xbmc/windowing/X11/WinSystemX11GLContext.cpp
index 7b3e9e40fe..3d838632cc 100644
--- a/xbmc/windowing/X11/WinSystemX11GLContext.cpp
+++ b/xbmc/windowing/X11/WinSystemX11GLContext.cpp
@@ -10,8 +10,10 @@
#include "GLContextEGL.h"
#include "OptionalsReg.h"
+#include "ServiceBroker.h"
#include "VideoSyncOML.h"
#include "X11DPMSSupport.h"
+#include "application/AppParams.h"
#include "application/ApplicationComponents.h"
#include "application/ApplicationSkinHandling.h"
#include "cores/RetroPlayer/process/X11/RPProcessInfoX11.h"
@@ -268,9 +270,10 @@ bool CWinSystemX11GLContext::RefreshGLContext(bool force)
std::transform(gpuvendor.begin(), gpuvendor.end(), gpuvendor.begin(), ::tolower);
bool isNvidia = (gpuvendor.compare(0, 6, "nvidia") == 0);
bool isIntel = (gpuvendor.compare(0, 5, "intel") == 0);
- std::string gli = (getenv("KODI_GL_INTERFACE") != nullptr) ? getenv("KODI_GL_INTERFACE") : "";
- if (gli != "GLX")
+ std::string_view gli = CServiceBroker::GetAppParams()->GetGlInterface();
+
+ if (gli != "glx")
{
m_pGLContext = new CGLContextEGL(m_dpy, EGL_OPENGL_API);
success = m_pGLContext->Refresh(force, m_screen, m_glWindow, m_newGlContext);
@@ -289,11 +292,11 @@ bool CWinSystemX11GLContext::RefreshGLContext(bool force)
VAAPIRegister(m_vaapiProxy.get(), deepColor);
return true;
}
- if (isIntel || gli == "EGL")
+ if (isIntel || gli == "egl")
return true;
}
}
- else if (gli == "EGL_PB")
+ else if (gli == "egl-pb")
{
success = m_pGLContext->CreatePB();
if (success)