[PATCH] Fix recursive ENTER_GL in LoadLocation.
Roderick Colenbrander
thunderbird2k at gmx.net
Sat Oct 18 18:29:42 CDT 2008
---
dlls/wined3d/surface.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index aea3f5a..83d9038 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -4435,7 +4435,6 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_LoadLocation(IWineD3DSurface *iface, D
if(!device->isInDraw) ActivateContext(device, device->lastActiveRenderTarget, CTXUSAGE_RESOURCELOAD);
surface_bind_and_dirtify(This);
- ENTER_GL();
/* The only place where LoadTexture() might get called when isInDraw=1
* is ActivateContext where lastActiveRenderTarget is preloaded.
@@ -4487,7 +4486,9 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_LoadLocation(IWineD3DSurface *iface, D
}
/* Make sure the correct pitch is used */
+ ENTER_GL();
glPixelStorei(GL_UNPACK_ROW_LENGTH, width);
+ LEAVE_GL();
if ((This->Flags & SFLAG_NONPOW2) && !(This->Flags & SFLAG_OVERSIZE)) {
TRACE("non power of two support\n");
@@ -4510,6 +4511,7 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_LoadLocation(IWineD3DSurface *iface, D
}
/* Restore the default pitch */
+ ENTER_GL();
glPixelStorei(GL_UNPACK_ROW_LENGTH, 0);
LEAVE_GL();
--
1.5.3.8
--========GMX316031224368292539064--
More information about the wine-patches
mailing list