fix d3d fb lock

This commit is contained in:
aap 2021-02-12 00:04:15 +01:00
parent 14dab85dca
commit 4c77fb5754
1 changed files with 1 additions and 1 deletions

View File

@ -602,7 +602,7 @@ rasterLock(Raster *raster, int32 level, int32 lockMode)
tex->GetSurfaceLevel(level, &rt); tex->GetSurfaceLevel(level, &rt);
D3DSURFACE_DESC desc; D3DSURFACE_DESC desc;
rt->GetDesc(&desc); rt->GetDesc(&desc);
HRESULT res = d3ddevice->CreateOffscreenPlainSurface(desc.Width, desc.Height, desc.Format, D3DPOOL_SYSTEMMEM, &rt, nil); HRESULT res = d3ddevice->CreateOffscreenPlainSurface(desc.Width, desc.Height, desc.Format, D3DPOOL_SYSTEMMEM, &surf, nil);
if(res != D3D_OK) if(res != D3D_OK)
return nil; return nil;
d3ddevice->GetRenderTargetData(rt, surf); d3ddevice->GetRenderTargetData(rt, surf);