mirror of
https://github.com/reactos/wine.git
synced 2024-11-26 21:20:25 +00:00
wined3d: Make sure we have an active GL context before calling d3dfmt_p8_upload_palette().
This commit is contained in:
parent
1b306c25e2
commit
626baad817
@ -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)) {
|
||||
|
Loading…
Reference in New Issue
Block a user