Alexandre Julliard : wined3d: Call wglSwapBuffers through the GL driver function table.
Alexandre Julliard
julliard at winehq.org
Thu Dec 6 16:25:10 CST 2012
Module: wine
Branch: master
Commit: 13f126498be00f4c34eb212dabc23f34d4864de3
URL: http://source.winehq.org/git/wine.git/?a=commit;h=13f126498be00f4c34eb212dabc23f34d4864de3
Author: Alexandre Julliard <julliard at winehq.org>
Date: Thu Dec 6 14:10:04 2012 +0100
wined3d: Call wglSwapBuffers through the GL driver function table.
---
dlls/wined3d/directx.c | 2 ++
dlls/wined3d/swapchain.c | 4 +++-
2 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
index 8d75045..d9b86d4 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 83d2ab5..bd36ce1 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 */
More information about the wine-cvs
mailing list