egl: Detect Windows platform using GDI
Reviewed-by: Eric Engestrom <eric@engestrom.ch> Reviewed By: Bill Kristiansen <billkris@microsoft.com> Acked-by: Roland Scheidegger <sroland@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12727>
This commit is contained in:
@@ -64,6 +64,9 @@
|
||||
#ifdef HAVE_DRM_PLATFORM
|
||||
#include <gbm.h>
|
||||
#endif
|
||||
#ifdef HAVE_WINDOWS_PLATFORM
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
@@ -128,6 +131,11 @@ _eglNativePlatformDetectNativeDisplay(void *nativeDisplay)
|
||||
if (nativeDisplay == EGL_DEFAULT_DISPLAY)
|
||||
return _EGL_INVALID_PLATFORM;
|
||||
|
||||
#ifdef HAVE_WINDOWS_PLATFORM
|
||||
if (GetObjectType(nativeDisplay) == OBJ_DC)
|
||||
return _EGL_PLATFORM_WINDOWS;
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_WAYLAND_PLATFORM) || defined(HAVE_DRM_PLATFORM)
|
||||
if (_eglPointerIsDereferencable(nativeDisplay)) {
|
||||
void *first_pointer = *(void **) nativeDisplay;
|
||||
|
Reference in New Issue
Block a user