diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index 8d75045e6b3..d9b86d411a5 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -5460,6 +5460,7 @@ static BOOL InitAdapters(struct wined3d *wined3d) #define USE_GL_FUNC(f) gl_info->gl_ops.gl.p_##f = (void *)GetProcAddress(mod_gl, #f); ALL_WGL_FUNCS #undef USE_GL_FUNC + gl_info->gl_ops.wgl.p_wglSwapBuffers = (void *)GetProcAddress(mod_gl, "wglSwapBuffers"); } #else /* To bypass the opengl32 thunks retrieve functions from the WGL driver instead of opengl32 */ @@ -5468,6 +5469,7 @@ static BOOL InitAdapters(struct wined3d *wined3d) const struct opengl_funcs *wgl_driver = __wine_get_wgl_driver( hdc, WINE_WGL_DRIVER_VERSION ); ReleaseDC( 0, hdc ); if (!wgl_driver || wgl_driver == (void *)-1) goto nogl_adapter; + gl_info->gl_ops.wgl = wgl_driver->wgl; gl_info->gl_ops.gl = wgl_driver->gl; } #endif diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c index 83d2ab57f01..bd36ce16fc4 100644 --- a/dlls/wined3d/swapchain.c +++ b/dlls/wined3d/swapchain.c @@ -560,7 +560,9 @@ static void swapchain_gl_present(struct wined3d_swapchain *swapchain, const RECT if (swapchain->num_contexts > 1) gl_info->gl_ops.gl.p_glFinish(); - SwapBuffers(context->hdc); /* TODO: cycle through the swapchain buffers */ + + /* call wglSwapBuffers through the gl table to avoid confusing the Steam overlay */ + gl_info->gl_ops.wgl.p_wglSwapBuffers(context->hdc); /* TODO: cycle through the swapchain buffers */ TRACE("SwapBuffers called, Starting new frame\n"); /* FPS support */