diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2022-09-15 17:08:33 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2022-11-28 13:32:48 +0100 |
commit | 2d002e42a8b6e711e3c9ca5b6dd3611e9d8426ab (patch) | |
tree | 2da22e8e37770c245be1f72f1c454a9c798b8db4 /src/core/ozone/gl_surface_glx_qt.cpp | |
parent | 4aa1690516fe76630a7cbb4816f56f0da081c596 (diff) |
Adaptations for 104-based
Change-Id: Ieb44b5c98b3342adca38916d8b77c54e8ed8e1d7
Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
Reviewed-by: Michal Klocek <michal.klocek@qt.io>
Diffstat (limited to 'src/core/ozone/gl_surface_glx_qt.cpp')
-rw-r--r-- | src/core/ozone/gl_surface_glx_qt.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/core/ozone/gl_surface_glx_qt.cpp b/src/core/ozone/gl_surface_glx_qt.cpp index f97f3de1e..1028f3235 100644 --- a/src/core/ozone/gl_surface_glx_qt.cpp +++ b/src/core/ozone/gl_surface_glx_qt.cpp @@ -86,37 +86,37 @@ GLSurfaceGLXQt::~GLSurfaceGLXQt() Destroy(); } -bool GLSurfaceGLXQt::InitializeOneOff() +GLDisplay *GLSurfaceGLXQt::InitializeOneOff(uint64_t system_device_id) { if (s_initialized) - return true; + return g_display; - g_display = new GLDisplayX11(); + g_display = new GLDisplayX11(system_device_id); if (!g_display->GetDisplay()) { LOG(ERROR) << "GLContextHelper::getXDisplay() failed."; - return false; + return nullptr; } g_config = GLContextHelper::getGlXConfig(); if (!g_config) { LOG(ERROR) << "GLContextHelper::getGlxConfig() failed."; - return false; + return nullptr; } Display* display = static_cast<Display*>(g_display->GetDisplay()); int major, minor; if (!glXQueryVersion(display, &major, &minor)) { LOG(ERROR) << "glxQueryVersion failed."; - return false; + return nullptr; } if (major == 1 && minor < 3) { LOG(ERROR) << "GLX 1.3 or later is required."; - return false; + return nullptr; } s_initialized = true; - return true; + return g_display; } |