wined3d: Call wglSwapBuffers through the GL driver function table.

This commit is contained in:
Alexandre Julliard 2012-12-06 14:10:04 +01:00
parent 15632df2c9
commit 13f126498b
2 changed files with 5 additions and 1 deletions

View File

@ -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

View File

@ -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 */