mirror of
				https://github.com/gnif/LookingGlass.git
				synced 2025-11-04 06:31:54 +00:00 
			
		
		
		
	[client] wayland: check for the Wayland platform extension
We used to test for the EGL_KHR_platform_base and EGL_EXT_platform_base, but those only really signal the availability of eglGetPlatformDisplay(EXT) functions, not whether the constant EGL_PLATFORM_WAYLAND_KHR or EGL_PLATFORM_WAYLAND_EXT is accepted by their respective functions. Instead, we switch to test for the extensions that tells us whether the Wayland platform is supported.
This commit is contained in:
		@@ -639,14 +639,14 @@ static EGLDisplay waylandGetEGLDisplay(void)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  const char *early_exts = eglQueryString(NULL, EGL_EXTENSIONS);
 | 
					  const char *early_exts = eglQueryString(NULL, EGL_EXTENSIONS);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  if (strstr(early_exts, "EGL_KHR_platform_base") != NULL &&
 | 
					  if (strstr(early_exts, "EGL_KHR_platform_wayland") != NULL &&
 | 
				
			||||||
      g_egl_dynProcs.eglGetPlatformDisplay)
 | 
					      g_egl_dynProcs.eglGetPlatformDisplay)
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    DEBUG_INFO("Using eglGetPlatformDisplay");
 | 
					    DEBUG_INFO("Using eglGetPlatformDisplay");
 | 
				
			||||||
    return g_egl_dynProcs.eglGetPlatformDisplay(EGL_PLATFORM_WAYLAND_KHR, native, NULL);
 | 
					    return g_egl_dynProcs.eglGetPlatformDisplay(EGL_PLATFORM_WAYLAND_KHR, native, NULL);
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  if (strstr(early_exts, "EGL_EXT_platform_base") != NULL &&
 | 
					  if (strstr(early_exts, "EGL_EXT_platform_wayland") != NULL &&
 | 
				
			||||||
      g_egl_dynProcs.eglGetPlatformDisplayEXT)
 | 
					      g_egl_dynProcs.eglGetPlatformDisplayEXT)
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    DEBUG_INFO("Using eglGetPlatformDisplayEXT");
 | 
					    DEBUG_INFO("Using eglGetPlatformDisplayEXT");
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user