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__) #elif defined(__WXMSW__)
typedef char* (*wglext)(); typedef char* (*wglext)();
wglext wglGetExtensionsString = (wglext)wglGetProcAddress("wglGetExtensionsString"); wglext wglGetExtensionsStringEXT = (wglext)wglGetProcAddress("wglGetExtensionsStringEXT");
if (wglGetExtensionsString == NULL || strstr(wglGetExtensionsString(), "WGL_EXT_swap_control") == 0) { if (wglGetExtensionsStringEXT == NULL) {
if (wglGetExtensionsString == NULL) systemScreenMessage(_("No support for wglGetExtensionsStringEXT"));
systemScreenMessage(_("No support for wglGetExtensionsString")); }
else else if (strstr(wglGetExtensionsStringEXT(), "WGL_EXT_swap_control") == 0) {
systemScreenMessage(_("No support for WGL_EXT_swap_control")); systemScreenMessage(_("No support for WGL_EXT_swap_control"));
} }
typedef bool (*PFNWGLSWAPINTERVALEXTPROC)(int); typedef bool (*PFNWGLSWAPINTERVALEXTPROC)(int);