Commit 13f12649 authored by Alexandre Julliard's avatar Alexandre Julliard

wined3d: Call wglSwapBuffers through the GL driver function table.

parent 15632df2
......@@ -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
......
......@@ -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 */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment