From 9c314a155dbda4b9360eb830287a11ece3d4977a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ed=C3=AAnis=20Freindorfer=20Azevedo?= Date: Thu, 25 Jun 2020 09:30:12 -0300 Subject: [PATCH] Use proper string `"wglGetExtensionsStringEXT"`. `"wglGetExtensionsString"` is not valid on Windows. --- src/wx/panel.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/wx/panel.cpp b/src/wx/panel.cpp index 8738829a..e9ebec81 100644 --- a/src/wx/panel.cpp +++ b/src/wx/panel.cpp @@ -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);