Henri Verbeet : wined3d: Set the swapchain.c GLINFO_LOCATION to *gl_info.
Alexandre Julliard
julliard at winehq.org
Mon May 24 11:30:49 CDT 2010
Module: wine
Branch: master
Commit: bcc4603125e85f30e0c041f6bec075289516b5ec
URL: http://source.winehq.org/git/wine.git/?a=commit;h=bcc4603125e85f30e0c041f6bec075289516b5ec
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Mon May 24 09:56:35 2010 +0200
wined3d: Set the swapchain.c GLINFO_LOCATION to *gl_info.
---
dlls/wined3d/swapchain.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
index 7dca253..485329c 100644
--- a/dlls/wined3d/swapchain.c
+++ b/dlls/wined3d/swapchain.c
@@ -33,7 +33,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(d3d);
WINE_DECLARE_DEBUG_CHANNEL(fps);
-#define GLINFO_LOCATION This->device->adapter->gl_info
+#define GLINFO_LOCATION (*gl_info)
/*IWineD3DSwapChain parts follow: */
static void WINAPI IWineD3DSwapChainImpl_Destroy(IWineD3DSwapChain *iface)
@@ -217,6 +217,7 @@ static void swapchain_blit(IWineD3DSwapChainImpl *This, struct wined3d_context *
static HRESULT WINAPI IWineD3DSwapChainImpl_Present(IWineD3DSwapChain *iface, CONST RECT *pSourceRect, CONST RECT *pDestRect, HWND hDestWindowOverride, CONST RGNDATA *pDirtyRegion, DWORD dwFlags) {
IWineD3DSwapChainImpl *This = (IWineD3DSwapChainImpl *)iface;
+ const struct wined3d_gl_info *gl_info;
struct wined3d_context *context;
RECT src_rect, dst_rect;
BOOL render_to_fbo;
@@ -233,6 +234,8 @@ static HRESULT WINAPI IWineD3DSwapChainImpl_Present(IWineD3DSwapChain *iface, CO
return WINED3D_OK;
}
+ gl_info = context->gl_info;
+
/* Render the cursor onto the back buffer, using our nifty directdraw blitting code :-) */
if (This->device->bCursorVisible && This->device->cursorTexture)
{
@@ -254,7 +257,7 @@ static HRESULT WINAPI IWineD3DSwapChainImpl_Present(IWineD3DSwapChain *iface, CO
cursor.resource.ref = 1;
cursor.resource.device = This->device;
cursor.resource.pool = WINED3DPOOL_SCRATCH;
- cursor.resource.format_desc = getFormatDescEntry(WINED3DFMT_B8G8R8A8_UNORM, context->gl_info);
+ cursor.resource.format_desc = getFormatDescEntry(WINED3DFMT_B8G8R8A8_UNORM, gl_info);
cursor.resource.resourceType = WINED3DRTYPE_SURFACE;
cursor.texture_name = This->device->cursorTexture;
cursor.texture_target = GL_TEXTURE_2D;
@@ -485,7 +488,7 @@ static HRESULT WINAPI IWineD3DSwapChainImpl_Present(IWineD3DSwapChain *iface, CO
}
if (This->presentParms.PresentationInterval != WINED3DPRESENT_INTERVAL_IMMEDIATE
- && context->gl_info->supported[SGI_VIDEO_SYNC])
+ && gl_info->supported[SGI_VIDEO_SYNC])
{
retval = GL_EXTCALL(glXGetVideoSyncSGI(&sync));
if(retval != 0) {
More information about the wine-cvs
mailing list