From 6d505e402691f349a195649cff28eb73f49e7eb0 Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Sun, 4 Feb 2024 18:05:46 -0500 Subject: [PATCH] Use strcmp() to compare char* strings (#4965) --- src/glview/OffscreenView.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/glview/OffscreenView.cc b/src/glview/OffscreenView.cc index fcc10796b8..8d21c05a5f 100644 --- a/src/glview/OffscreenView.cc +++ b/src/glview/OffscreenView.cc @@ -52,13 +52,13 @@ OffscreenView::OffscreenView(uint32_t width, uint32_t height) // FIXME: It's possible that GLEW was built using EGL, in which case this // logic isn't correct, but we don't have a good way of determining how GLEW was built. #if defined(USE_GLEW) || defined(OPENCSG_GLEW) - provider = provider == "egl" ? "glx" : provider; + provider = !strcmp(provider, "egl") ? "glx-old" : provider; #endif this->ctx = OffscreenContextFactory::create(provider, attrib); if (!this->ctx) { // If the provider defaulted to EGL, fall back to GLX if EGL failed - if (provider == "egl") { - this->ctx = OffscreenContextFactory::create("glx", attrib); + if (!strcmp(provider, "egl")) { + this->ctx = OffscreenContextFactory::create("glx-old", attrib); } if (!this->ctx) { throw OffscreenViewException("Unable to obtain GL Context");