Fix error when trying to make DCP-o-matic DKDMs due to attempts to make
[dcpomatic.git] / src / wx / gl_video_view.cc
index 0e8e459d87b66cc0695f60ae85ef07c98226c0ea..a0f83db6d4390dfba4d056d5d4eb13da67048164 100644 (file)
@@ -70,8 +70,11 @@ GLVideoView::GLVideoView (FilmViewer* viewer, wxWindow *parent)
 #ifdef DCPOMATIC_WINDOWS
        if (_canvas->IsExtensionSupported("WGL_EXT_swap_control")) {
                /* Enable vsync */
-               wglSwapIntervalEXT (1);
-               _vsync_enabled = true;
+               PFNWGLSWAPINTERVALEXTPROC swap = (PFNWGLSWAPINTERVALEXTPROC) wglGetProcAddress("wglSwapIntervalEXT");
+               if (swap) {
+                       swap (1);
+                       _vsync_enabled = true;
+               }
        }
 
 #endif