X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5ec69e9666e300c9ba210812a11ca5dc9111b5f9..dd9f8b6bb6935360a8271dc3e8749fb026b601a8:/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;