Module: wine Branch: master Commit: b98a7b50824fee0e01c93c26da1098602567d946 URL: http://source.winehq.org/git/wine.git/?a=commit;h=b98a7b50824fee0e01c93c26da...
Author: Roderick Colenbrander thunderbird2k@gmx.net Date: Sat Oct 18 23:29:42 2008 +0000
wined3d: Fix recursive ENTER_GL in LoadLocation.
---
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 a91da6c..953985b 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -4420,7 +4420,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. @@ -4472,7 +4471,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"); @@ -4495,6 +4496,7 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_LoadLocation(IWineD3DSurface *iface, D }
/* Restore the default pitch */ + ENTER_GL(); glPixelStorei(GL_UNPACK_ROW_LENGTH, 0); LEAVE_GL();