X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5ec69e9666e300c9ba210812a11ca5dc9111b5f9..fe828a03f46181cc172bf61739fe09a043f73aea:/src/msw/glcanvas.cpp diff --git a/src/msw/glcanvas.cpp b/src/msw/glcanvas.cpp index 2c5406e2fd..edf2264d60 100644 --- a/src/msw/glcanvas.cpp +++ b/src/msw/glcanvas.cpp @@ -450,6 +450,14 @@ wxGLCanvas::ChooseMatchingPixelFormat(HDC hdc, return ::ChoosePixelFormat(hdc, ppfd); } +/* static */ +bool wxGLCanvasBase::IsDisplaySupported(const int *attribList) +{ + // We need a device context to test the pixel format, so get one + // for the root window. + return wxGLCanvas::ChooseMatchingPixelFormat(ScreenHDC(), attribList) > 0; +} + bool wxGLCanvas::DoSetup(const int *attribList) { PIXELFORMATDESCRIPTOR pfd;