Module: wine Branch: master Commit: 626baad817415f62cec4bb5f75d806a793ed67f1 URL: http://source.winehq.org/git/wine.git/?a=commit;h=626baad817415f62cec4bb5f75...
Author: Henri Verbeet hverbeet@codeweavers.com Date: Fri Jun 26 10:07:11 2009 +0200
wined3d: Make sure we have an active GL context before calling d3dfmt_p8_upload_palette().
---
dlls/wined3d/surface.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index e3070d2..bac2fe5 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -4094,6 +4094,8 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_RealizePalette(IWineD3DSurface *iface)
if((This->resource.usage & WINED3DUSAGE_RENDERTARGET) && (convert == NO_CONVERSION)) { + IWineD3DDeviceImpl *device = This->resource.wineD3DDevice; + /* Make sure the texture is up to date. This call doesn't do anything if the texture is already up to date. */ IWineD3DSurface_LoadLocation(iface, SFLAG_INTEXTURE, NULL);
@@ -4101,6 +4103,7 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_RealizePalette(IWineD3DSurface *iface) IWineD3DSurface_ModifyLocation(iface, SFLAG_INDRAWABLE, FALSE);
/* Re-upload the palette */ + ActivateContext(device, device->lastActiveRenderTarget, CTXUSAGE_RESOURCELOAD); d3dfmt_p8_upload_palette(iface, convert); } else { if(!(This->Flags & SFLAG_INSYSMEM)) {