Use proper string `"wglGetExtensionsStringEXT"`.

`"wglGetExtensionsString"` is not valid on Windows.
This commit is contained in:
Edênis Freindorfer Azevedo 2020-06-25 09:30:12 -03:00 committed by Rafael Kitover
parent 7c8ba1e7c5
commit 9c314a155d
No known key found for this signature in database
GPG Key ID: 08AB596679D86240
1 changed files with 6 additions and 6 deletions

View File

@ -2290,12 +2290,12 @@ void GLDrawingPanel::DrawingPanelInit()
}
#elif defined(__WXMSW__)
typedef char* (*wglext)();
wglext wglGetExtensionsString = (wglext)wglGetProcAddress("wglGetExtensionsString");
if (wglGetExtensionsString == NULL || strstr(wglGetExtensionsString(), "WGL_EXT_swap_control") == 0) {
if (wglGetExtensionsString == NULL)
systemScreenMessage(_("No support for wglGetExtensionsString"));
else
systemScreenMessage(_("No support for WGL_EXT_swap_control"));
wglext wglGetExtensionsStringEXT = (wglext)wglGetProcAddress("wglGetExtensionsStringEXT");
if (wglGetExtensionsStringEXT == NULL) {
systemScreenMessage(_("No support for wglGetExtensionsStringEXT"));
}
else if (strstr(wglGetExtensionsStringEXT(), "WGL_EXT_swap_control") == 0) {
systemScreenMessage(_("No support for WGL_EXT_swap_control"));
}
typedef bool (*PFNWGLSWAPINTERVALEXTPROC)(int);