Merge pull request #62 from HaydnTrigg/master

D3DDevice recreateVidmemRasters and IDirect3DDevice::CreateTexture undefined behavior
This commit is contained in:
aap 2021-02-21 20:03:12 +01:00 committed by GitHub
commit 373f8399cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -1129,7 +1129,7 @@ recreateVidmemRasters(void)
switch(raster->type){
case Raster::CAMERATEXTURE: {
int32 levels = Raster::calculateNumLevels(raster->width, raster->height);
IDirect3DTexture9 *tex;
IDirect3DTexture9 *tex = nil;
d3ddevice->CreateTexture(raster->width, raster->height,
raster->format & Raster::MIPMAP ? levels : 1,
D3DUSAGE_RENDERTARGET,